当前位置: 首页>>代码示例>>Python>>正文


Python POINTER.in_dll方法代码示例

本文整理汇总了Python中ctypes.POINTER.in_dll方法的典型用法代码示例。如果您正苦于以下问题:Python POINTER.in_dll方法的具体用法?Python POINTER.in_dll怎么用?Python POINTER.in_dll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ctypes.POINTER的用法示例。


在下文中一共展示了POINTER.in_dll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setattr

# 需要导入模块: from ctypes import POINTER [as 别名]
# 或者: from ctypes.POINTER import in_dll [as 别名]
    setattr(Security, 'OSStatus', OSStatus)

    setattr(Security, 'SecAccessRef', SecAccessRef)
    setattr(Security, 'SecKeyRef', SecKeyRef)

    setattr(Security, 'SecPolicySearchRef', SecPolicySearchRef)
    setattr(Security, 'SecPolicyRef', SecPolicyRef)

    setattr(Security, 'CSSM_DATA', CSSM_DATA)
    setattr(Security, 'CSSM_OID', CSSM_OID)
    setattr(Security, 'CSSM_APPLE_TP_OCSP_OPTIONS', CSSM_APPLE_TP_OCSP_OPTIONS)
    setattr(Security, 'CSSM_APPLE_TP_CRL_OPTIONS', CSSM_APPLE_TP_CRL_OPTIONS)

    setattr(Security, 'kSecRandomDefault', SecRandomRef.in_dll(Security, 'kSecRandomDefault'))

    setattr(Security, 'kSecPaddingKey', CFStringRef.in_dll(Security, 'kSecPaddingKey'))
    setattr(Security, 'kSecPaddingPKCS7Key', CFStringRef.in_dll(Security, 'kSecPaddingPKCS7Key'))
    setattr(Security, 'kSecPaddingPKCS5Key', CFStringRef.in_dll(Security, 'kSecPaddingPKCS5Key'))
    setattr(Security, 'kSecPaddingPKCS1Key', CFStringRef.in_dll(Security, 'kSecPaddingPKCS1Key'))
    setattr(Security, 'kSecPaddingOAEPKey', CFStringRef.in_dll(Security, 'kSecPaddingOAEPKey'))
    setattr(Security, 'kSecPaddingNoneKey', CFStringRef.in_dll(Security, 'kSecPaddingNoneKey'))
    setattr(Security, 'kSecModeCBCKey', CFStringRef.in_dll(Security, 'kSecModeCBCKey'))
    setattr(
        Security,
        'kSecTransformInputAttributeName',
        CFStringRef.in_dll(Security, 'kSecTransformInputAttributeName')
    )
    setattr(Security, 'kSecDigestTypeAttribute', CFStringRef.in_dll(Security, 'kSecDigestTypeAttribute'))
    setattr(Security, 'kSecDigestLengthAttribute', CFStringRef.in_dll(Security, 'kSecDigestLengthAttribute'))
    setattr(Security, 'kSecIVKey', CFStringRef.in_dll(Security, 'kSecIVKey'))
开发者ID:doncisco,项目名称:sublime-text-2-settings,代码行数:32,代码来源:_security_ctypes.py

示例2:

# 需要导入模块: from ctypes import POINTER [as 别名]
# 或者: from ctypes.POINTER import in_dll [as 别名]
    Security.SecCopyErrorMessageString.restype = CFStringRef

    Security.SSLReadFunc = SSLReadFunc
    Security.SSLWriteFunc = SSLWriteFunc
    Security.SSLContextRef = SSLContextRef
    Security.SSLProtocol = SSLProtocol
    Security.SSLCipherSuite = SSLCipherSuite
    Security.SecIdentityRef = SecIdentityRef
    Security.SecKeychainRef = SecKeychainRef
    Security.SecTrustRef = SecTrustRef
    Security.SecTrustResultType = SecTrustResultType
    Security.SecExternalFormat = SecExternalFormat
    Security.OSStatus = OSStatus

    Security.kSecImportExportPassphrase = CFStringRef.in_dll(
        Security, 'kSecImportExportPassphrase'
    )
    Security.kSecImportItemIdentity = CFStringRef.in_dll(
        Security, 'kSecImportItemIdentity'
    )

    # CoreFoundation time!
    CoreFoundation.CFRetain.argtypes = [
        CFTypeRef
    ]
    CoreFoundation.CFRetain.restype = CFTypeRef

    CoreFoundation.CFRelease.argtypes = [
        CFTypeRef
    ]
    CoreFoundation.CFRelease.restype = None
开发者ID:2216288075,项目名称:meiduo_project,代码行数:33,代码来源:bindings.py

示例3: setattr

# 需要导入模块: from ctypes import POINTER [as 别名]
# 或者: from ctypes.POINTER import in_dll [as 别名]
    CoreFoundation.CFNumberGetValue.restype = c_bool

    CoreFoundation.CFDictionaryGetKeysAndValues.argtypes = [
        CFDictionaryRef,
        pointer_p,
        pointer_p
    ]
    CoreFoundation.CFDictionaryGetKeysAndValues.restype = CFIndex

    CoreFoundation.CFGetTypeID.argtypes = [
        CFTypeRef
    ]
    CoreFoundation.CFGetTypeID.restype = CFTypeID

    setattr(CoreFoundation, 'kCFAllocatorDefault', CFAllocatorRef.in_dll(CoreFoundation, 'kCFAllocatorDefault'))
    setattr(CoreFoundation, 'kCFBooleanTrue', CFTypeRef.in_dll(CoreFoundation, 'kCFBooleanTrue'))

    kCFTypeDictionaryKeyCallBacks = c_void_p.in_dll(CoreFoundation, 'kCFTypeDictionaryKeyCallBacks')
    kCFTypeDictionaryValueCallBacks = c_void_p.in_dll(CoreFoundation, 'kCFTypeDictionaryValueCallBacks')
    kCFTypeArrayCallBacks = c_void_p.in_dll(CoreFoundation, 'kCFTypeArrayCallBacks')

except (AttributeError):
    raise FFIEngineError('Error initializing ctypes')

setattr(CoreFoundation, 'CFDataRef', CFDataRef)
setattr(CoreFoundation, 'CFErrorRef', CFErrorRef)
setattr(CoreFoundation, 'CFArrayRef', CFArrayRef)
kCFNumberCFIndexType = CFNumberType(14)
kCFStringEncodingUTF8 = CFStringEncoding(0x08000100)

开发者ID:Cophy08,项目名称:oscrypto,代码行数:31,代码来源:_core_foundation_ctypes.py


注:本文中的ctypes.POINTER.in_dll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。