當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。