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


Python ctypes.HRESULT属性代码示例

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


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

示例1: _do_debug_create

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import HRESULT [as 别名]
def _do_debug_create(self):
        DebugClient = IDebugClient(0)

        DebugCreateAddr = winproxy.GetProcAddress(self.hmoduledbgeng, "DebugCreate")
        DebugCreate = WINFUNCTYPE(HRESULT, PVOID, PVOID)(DebugCreateAddr)
        DebugCreate(IID_IDebugClient, byref(DebugClient))
        return DebugClient 
开发者ID:sogeti-esec-lab,项目名称:LKD,代码行数:9,代码来源:dbginterface.py

示例2: HRValue

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import HRESULT [as 别名]
def HRValue(hr):
    _hr = comtypes.HRESULT(hr) 
    return ctypes.c_ulong(_hr.value).value 
开发者ID:Qirky,项目名称:PyKinectTk,代码行数:5,代码来源:PyKinectV2.py

示例3: IsHR

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import HRESULT [as 别名]
def IsHR(hr, value):
    _hr = comtypes.HRESULT(hr) 
    return ctypes.c_ulong(_hr.value).value == value 
开发者ID:Qirky,项目名称:PyKinectTk,代码行数:5,代码来源:PyKinectV2.py

示例4: __init__

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import HRESULT [as 别名]
def __init__(self, *args):
        super(STDMETHOD, self).__init__(ctypes.HRESULT, *args) 
开发者ID:shrimpboyho,项目名称:flappy-bird-py,代码行数:4,代码来源:com.py

示例5: to_list

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import HRESULT [as 别名]
def to_list(self, t=None):
            if t is None:
                if hasattr(self, "elt_type"):
                    t = self.elt_type
                else:
                    raise ValueError("Missing type of the array")
            if self.cDims !=  1:
                raise NotImplementedError("tagSAFEARRAY if dims != 1")

            nb_element = self.rgsabound[0].cElements
            llbound = self.rgsabound[0].lLbound
            if self.cbElements != ctypes.sizeof(t):
                raise ValueError("Size of elements != sizeof(type)")
            data = [t.from_address(self.pvData + (i + llbound) * ctypes.sizeof(t)).value for i in range(nb_element)]
            return data

#VT_VALUE_TO_TYPE = {
#VT_I2 : SHORT,
#VT_I4 : LONG,
#VT_BSTR : BSTR,
#VT_VARIANT : VARIANT,
#VT_UI1 : UCHAR,
#VT_UI2 : USHORT,
#VT_UI4 : DWORD,
#VT_I8 : LONGLONG,
#VT_UI8 : ULONG64,
#VT_INT : INT,
#VT_UINT : UINT,
#VT_HRESULT : HRESULT,
#VT_PTR : PVOID,
#VT_LPSTR : LPCSTR,
#VT_LPWSTR : LPWSTR,
#}

# VARIANT type checker
# Allow to guess a VARIANT_TYPE og a python value 
开发者ID:hakril,项目名称:PythonForWindows,代码行数:38,代码来源:com.py

示例6: proto

# 需要导入模块: import ctypes [as 别名]
# 或者: from ctypes import HRESULT [as 别名]
def proto(*argtypes, retval=None):
    if retval is not None:
        argtypes = (*argtypes, POINTER(retval))
    proto = WINFUNCTYPE(HRESULT, *argtypes)
    proto._retval = retval
    return proto 
开发者ID:ninthDevilHAUNSTER,项目名称:ArknightsAutoHelper,代码行数:8,代码来源:delegate.py


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