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


Python ctypes.POINTER属性代码示例

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


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

示例1: Indicate

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import POINTER [as 别名]
def Indicate(self, object_count, obj_array):
        prototype = ctypes.WINFUNCTYPE(HRESULT,
                                       ctypes.c_long,
                                       ctypes.POINTER(wintypes.LPVOID))

        paramflags = ((_In_, 'lObjectCount'),
                      (_In_, 'apObjArray'),
                      )

        _Indicate = prototype(IWbemObjectSink_Indicate_Idx,
                              'Indicate',
                              paramflags)
        _Indicate.errcheck = winapi.RAISE_NON_ZERO_ERR
        _Indicate(self.this,
                  object_count,
                  obj_array.this if obj_array else None
                  ) 
开发者ID:fireeye,项目名称:cWMI,代码行数:19,代码来源:wmi.py

示例2: Get

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import POINTER [as 别名]
def Get(self, name, flags):
        prototype = ctypes.WINFUNCTYPE(HRESULT,
                                       wintypes.LPCWSTR,
                                       ctypes.c_long,
                                       ctypes.POINTER(winapi.VARIANT),
                                       ctypes.POINTER(ctypes.c_long))

        paramflags = ((_In_, 'wszName'),
                      (_In_, 'lFlags'),
                      (_Out_, 'pVal'),
                      (_Out_, 'plFlavor'),
                      )

        _Get = prototype(IWbemQualifierSet_Get_Idx,
                         'Get',
                         paramflags)
        _Get.errcheck = winapi.RAISE_NON_ZERO_ERR
        return_obj, return_obj2 = _Get(self.this,
                                       name,
                                       flags
                                       )
        return return_obj, return_obj2 
开发者ID:fireeye,项目名称:cWMI,代码行数:24,代码来源:wmi.py

示例3: Put

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import POINTER [as 别名]
def Put(self, name, val, flavor):
        prototype = ctypes.WINFUNCTYPE(HRESULT,
                                       wintypes.LPCWSTR,
                                       ctypes.POINTER(winapi.VARIANT),
                                       ctypes.c_long)

        paramflags = ((_In_, 'wszName'),
                      (_In_, 'pVal'),
                      (_In_, 'lFlavor'),
                      )

        _Put = prototype(IWbemQualifierSet_Put_Idx,
                         'Put',
                         paramflags)
        _Put.errcheck = winapi.RAISE_NON_ZERO_ERR
        _Put(self.this,
             name,
             ctypes.byref(val) if val else None,
             flavor
             ) 
开发者ID:fireeye,项目名称:cWMI,代码行数:22,代码来源:wmi.py

示例4: GetNames

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import POINTER [as 别名]
def GetNames(self, flags):
        prototype = ctypes.WINFUNCTYPE(HRESULT,
                                       ctypes.c_long,
                                       ctypes.POINTER(wintypes.LPVOID))

        paramflags = ((_In_, 'lFlags'),
                      (_Out_, 'pNames'),
                      )

        _GetNames = prototype(IWbemQualifierSet_GetNames_Idx,
                              'GetNames',
                              paramflags)
        _GetNames.errcheck = winapi.RAISE_NON_ZERO_ERR
        return_obj = _GetNames(self.this,
                               flags
                               )
        return_obj = ctypes.cast(wintypes.LPVOID(return_obj), ctypes.POINTER(winapi.SAFEARRAY))
        return return_obj 
开发者ID:fireeye,项目名称:cWMI,代码行数:20,代码来源:wmi.py

示例5: GetQualifierSet

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import POINTER [as 别名]
def GetQualifierSet(self):
        prototype = ctypes.WINFUNCTYPE(HRESULT,
                                       ctypes.POINTER(wintypes.LPVOID))

        paramflags = ((_Out_, 'ppQualSet'),
                      )

        _GetQualifierSet = prototype(IWbemClassObject_GetQualifierSet_Idx,
                                     'GetQualifierSet',
                                     paramflags)
        _GetQualifierSet.errcheck = winapi.RAISE_NON_ZERO_ERR
        return_obj = _GetQualifierSet(self.this
                                      )
        try:
            return_obj = IWbemQualifierSet(return_obj)
        except WindowsError:
            return_obj = None
        return return_obj 
开发者ID:fireeye,项目名称:cWMI,代码行数:20,代码来源:wmi.py

示例6: Next

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import POINTER [as 别名]
def Next(self, flags):
        prototype = ctypes.WINFUNCTYPE(HRESULT,
                                       ctypes.c_long,
                                       ctypes.POINTER(BSTR),
                                       ctypes.POINTER(winapi.VARIANT),
                                       ctypes.POINTER(CIMTYPE),
                                       ctypes.POINTER(ctypes.c_long))

        paramflags = ((_In_, 'lFlags'),
                      (_Out_, 'strName'),
                      (_Out_, 'pVal'),
                      (_Out_, 'pType'),
                      (_Out_, 'plFlavor'),
                      )

        _Next = prototype(IWbemClassObject_Next_Idx,
                          'Next',
                          paramflags)
        _Next.errcheck = winapi.RAISE_NON_ZERO_ERR
        return_obj, return_obj2, return_obj3, return_obj4 = _Next(self.this,
                                                                  flags
                                                                  )
        return_obj = winapi.convert_bstr_to_str(return_obj)
        return return_obj, return_obj2, return_obj3, return_obj4 
开发者ID:fireeye,项目名称:cWMI,代码行数:26,代码来源:wmi.py

示例7: Clone

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import POINTER [as 别名]
def Clone(self):
        prototype = ctypes.WINFUNCTYPE(HRESULT,
                                       ctypes.POINTER(wintypes.LPVOID))

        paramflags = ((_Out_, 'ppCopy'),
                      )

        _Clone = prototype(IWbemClassObject_Clone_Idx,
                           'Clone',
                           paramflags)
        _Clone.errcheck = winapi.RAISE_NON_ZERO_ERR
        return_obj = _Clone(self.this
                            )
        try:
            return_obj = IWbemClassObject(return_obj)
        except WindowsError:
            return_obj = None
        return return_obj 
开发者ID:fireeye,项目名称:cWMI,代码行数:20,代码来源:wmi.py

示例8: GetObjectText

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import POINTER [as 别名]
def GetObjectText(self, flags):
        prototype = ctypes.WINFUNCTYPE(HRESULT,
                                       ctypes.c_long,
                                       ctypes.POINTER(BSTR))

        paramflags = ((_In_, 'lFlags'),
                      (_Out_, 'pstrObjectText'),
                      )

        _GetObjectText = prototype(IWbemClassObject_GetObjectText_Idx,
                                   'GetObjectText',
                                   paramflags)
        _GetObjectText.errcheck = winapi.RAISE_NON_ZERO_ERR
        return_obj = _GetObjectText(self.this,
                                    flags
                                    )
        return_obj = winapi.convert_bstr_to_str(return_obj)
        return return_obj 
开发者ID:fireeye,项目名称:cWMI,代码行数:20,代码来源:wmi.py

示例9: SpawnDerivedClass

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import POINTER [as 别名]
def SpawnDerivedClass(self, flags):
        prototype = ctypes.WINFUNCTYPE(HRESULT,
                                       ctypes.c_long,
                                       ctypes.POINTER(wintypes.LPVOID))

        paramflags = ((_In_, 'lFlags'),
                      (_Out_, 'ppNewClass'),
                      )

        _SpawnDerivedClass = prototype(IWbemClassObject_SpawnDerivedClass_Idx,
                                       'SpawnDerivedClass',
                                       paramflags)
        _SpawnDerivedClass.errcheck = winapi.RAISE_NON_ZERO_ERR
        return_obj = _SpawnDerivedClass(self.this,
                                        flags
                                        )
        try:
            return_obj = IWbemClassObject(return_obj)
        except WindowsError:
            return_obj = None
        return return_obj 
开发者ID:fireeye,项目名称:cWMI,代码行数:23,代码来源:wmi.py

示例10: SpawnInstance

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import POINTER [as 别名]
def SpawnInstance(self, flags):
        prototype = ctypes.WINFUNCTYPE(HRESULT,
                                       ctypes.c_long,
                                       ctypes.POINTER(wintypes.LPVOID))

        paramflags = ((_In_, 'lFlags'),
                      (_Out_, 'ppNewInstance'),
                      )

        _SpawnInstance = prototype(IWbemClassObject_SpawnInstance_Idx,
                                   'SpawnInstance',
                                   paramflags)
        _SpawnInstance.errcheck = winapi.RAISE_NON_ZERO_ERR
        return_obj = _SpawnInstance(self.this,
                                    flags
                                    )
        try:
            return_obj = IWbemClassObject(return_obj)
        except WindowsError:
            return_obj = None
        return return_obj 
开发者ID:fireeye,项目名称:cWMI,代码行数:23,代码来源:wmi.py

示例11: CompareTo

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import POINTER [as 别名]
def CompareTo(self, flags, compare_to):
        prototype = ctypes.WINFUNCTYPE(HRESULT,
                                       ctypes.c_long,
                                       ctypes.POINTER(IWbemClassObject))

        paramflags = ((_In_, 'lFlags'),
                      (_In_, 'pCompareTo'),
                      )

        _CompareTo = prototype(IWbemClassObject_CompareTo_Idx,
                               'CompareTo',
                               paramflags)
        _CompareTo.errcheck = winapi.RAISE_NON_ZERO_ERR
        _CompareTo(self.this,
                   flags,
                   compare_to.this if compare_to else None
                   ) 
开发者ID:fireeye,项目名称:cWMI,代码行数:19,代码来源:wmi.py

示例12: PutMethod

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import POINTER [as 别名]
def PutMethod(self, name, flags, in_signature, out_signature):
        prototype = ctypes.WINFUNCTYPE(HRESULT,
                                       wintypes.LPCWSTR,
                                       ctypes.c_long,
                                       ctypes.POINTER(IWbemClassObject),
                                       ctypes.POINTER(IWbemClassObject))

        paramflags = ((_In_, 'wszName'),
                      (_In_, 'lFlags'),
                      (_In_, 'pInSignature'),
                      (_In_, 'pOutSignature'),
                      )

        _PutMethod = prototype(IWbemClassObject_PutMethod_Idx,
                               'PutMethod',
                               paramflags)
        _PutMethod.errcheck = winapi.RAISE_NON_ZERO_ERR
        _PutMethod(self.this,
                   name,
                   flags,
                   in_signature.this if in_signature else None,
                   out_signature.this if out_signature else None
                   ) 
开发者ID:fireeye,项目名称:cWMI,代码行数:25,代码来源:wmi.py

示例13: GetMethodQualifierSet

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import POINTER [as 别名]
def GetMethodQualifierSet(self, method):
        prototype = ctypes.WINFUNCTYPE(HRESULT,
                                       wintypes.LPCWSTR,
                                       ctypes.POINTER(wintypes.LPVOID))

        paramflags = ((_In_, 'wszMethod'),
                      (_Out_, 'ppQualSet'),
                      )

        _GetMethodQualifierSet = prototype(IWbemClassObject_GetMethodQualifierSet_Idx,
                                           'GetMethodQualifierSet',
                                           paramflags)
        _GetMethodQualifierSet.errcheck = winapi.RAISE_NON_ZERO_ERR
        return_obj = _GetMethodQualifierSet(self.this,
                                            method
                                            )
        try:
            return_obj = IWbemQualifierSet(return_obj)
        except WindowsError:
            return_obj = None
        return return_obj 
开发者ID:fireeye,项目名称:cWMI,代码行数:23,代码来源:wmi.py

示例14: GetMethodOrigin

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import POINTER [as 别名]
def GetMethodOrigin(self, method_name):
        prototype = ctypes.WINFUNCTYPE(HRESULT,
                                       wintypes.LPCWSTR,
                                       ctypes.POINTER(BSTR))

        paramflags = ((_In_, 'wszMethodName'),
                      (_Out_, 'pstrClassName'),
                      )

        _GetMethodOrigin = prototype(IWbemClassObject_GetMethodOrigin_Idx,
                                     'GetMethodOrigin',
                                     paramflags)
        _GetMethodOrigin.errcheck = winapi.RAISE_NON_ZERO_ERR
        return_obj = _GetMethodOrigin(self.this,
                                      method_name
                                      )
        return_obj = winapi.convert_bstr_to_str(return_obj)
        return return_obj 
开发者ID:fireeye,项目名称:cWMI,代码行数:20,代码来源:wmi.py

示例15: NextAsync

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import POINTER [as 别名]
def NextAsync(self, count, sink):
        prototype = ctypes.WINFUNCTYPE(HRESULT,
                                       wintypes.ULONG,
                                       ctypes.POINTER(IWbemObjectSink))

        paramflags = ((_In_, 'uCount'),
                      (_In_, 'pSink'),
                      )

        _NextAsync = prototype(IEnumWbemClassObject_NextAsync_Idx,
                               'NextAsync',
                               paramflags)
        _NextAsync.errcheck = winapi.RAISE_NON_ZERO_ERR
        _NextAsync(self.this,
                   count,
                   sink.this if sink else None
                   ) 
开发者ID:fireeye,项目名称:cWMI,代码行数:19,代码来源:wmi.py


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