本文整理汇总了Python中ctypes.WINFUNCTYPE属性的典型用法代码示例。如果您正苦于以下问题:Python ctypes.WINFUNCTYPE属性的具体用法?Python ctypes.WINFUNCTYPE怎么用?Python ctypes.WINFUNCTYPE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类ctypes
的用法示例。
在下文中一共展示了ctypes.WINFUNCTYPE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Indicate
# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import WINFUNCTYPE [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
)
示例2: Get
# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import WINFUNCTYPE [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
示例3: Put
# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import WINFUNCTYPE [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
)
示例4: Next
# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import WINFUNCTYPE [as 别名]
def Next(self, flags):
prototype = ctypes.WINFUNCTYPE(HRESULT,
ctypes.c_long,
ctypes.POINTER(BSTR),
ctypes.POINTER(winapi.VARIANT),
ctypes.POINTER(ctypes.c_long))
paramflags = ((_In_, 'lFlags'),
(_Out_, 'pstrName'),
(_Out_, 'pVal'),
(_Out_, 'plFlavor'),
)
_Next = prototype(IWbemQualifierSet_Next_Idx,
'Next',
paramflags)
_Next.errcheck = winapi.RAISE_NON_ZERO_ERR
return_obj, return_obj2, return_obj3 = _Next(self.this,
flags
)
return_obj = winapi.convert_bstr_to_str(return_obj)
return return_obj, return_obj2, return_obj3
示例5: GetQualifierSet
# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import WINFUNCTYPE [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
示例6: GetNames
# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import WINFUNCTYPE [as 别名]
def GetNames(self, qualifier_name, flags, qualifier_val):
prototype = ctypes.WINFUNCTYPE(HRESULT,
wintypes.LPCWSTR,
ctypes.c_long,
ctypes.POINTER(winapi.VARIANT),
ctypes.POINTER(wintypes.LPVOID))
paramflags = ((_In_, 'wszQualifierName'),
(_In_, 'lFlags'),
(_In_, 'pQualifierVal'),
(_Out_, 'pNames'),
)
_GetNames = prototype(IWbemClassObject_GetNames_Idx,
'GetNames',
paramflags)
_GetNames.errcheck = winapi.RAISE_NON_ZERO_ERR
return_obj = _GetNames(self.this,
qualifier_name,
flags,
ctypes.byref(qualifier_val) if qualifier_val else None
)
return_obj = ctypes.cast(wintypes.LPVOID(return_obj), ctypes.POINTER(winapi.SAFEARRAY))
return return_obj
示例7: Clone
# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import WINFUNCTYPE [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
示例8: GetObjectText
# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import WINFUNCTYPE [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
示例9: SpawnDerivedClass
# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import WINFUNCTYPE [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
示例10: SpawnInstance
# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import WINFUNCTYPE [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
示例11: CompareTo
# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import WINFUNCTYPE [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
)
示例12: PutMethod
# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import WINFUNCTYPE [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
)
示例13: GetMethodQualifierSet
# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import WINFUNCTYPE [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
示例14: GetMethodOrigin
# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import WINFUNCTYPE [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
示例15: Skip
# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import WINFUNCTYPE [as 别名]
def Skip(self, timeout, count):
prototype = ctypes.WINFUNCTYPE(HRESULT,
ctypes.c_long,
wintypes.ULONG)
paramflags = ((_In_, 'lTimeout'),
(_In_, 'nCount'),
)
_Skip = prototype(IEnumWbemClassObject_Skip_Idx,
'Skip',
paramflags)
_Skip.errcheck = winapi.RAISE_NON_ZERO_ERR
_Skip(self.this,
timeout,
count
)