[ctypes-commit] ctypes/comtypes automation.py,1.7,1.8
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2005-02-10 19:37:21
|
Update of /cvsroot/ctypes/ctypes/comtypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12328 Modified Files: automation.py Log Message: Restructuring. Index: automation.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/comtypes/automation.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** automation.py 8 Feb 2005 20:44:27 -0000 1.7 --- automation.py 10 Feb 2005 19:37:12 -0000 1.8 *************** *** 230,233 **** --- 230,296 ---- ################################################################ + class tagTLIBATTR(Structure): + _fields_ = [ + ('guid', GUID), + ('lcid', LCID), + ('syskind', SYSKIND), + ('wMajorVerNum', WORD), + ('wMinorVerNum', WORD), + ('wLibFlags', WORD), + ] + assert sizeof(tagTLIBATTR) == 32, sizeof(tagTLIBATTR) + assert alignment(tagTLIBATTR) == 4, alignment(tagTLIBATTR) + TLIBATTR = tagTLIBATTR # typedef + + class tagIDLDESC(Structure): + _fields_ = [ + ('dwReserved', ULONG_PTR), + ('wIDLFlags', USHORT), + ] + assert sizeof(tagIDLDESC) == 8, sizeof(tagIDLDESC) + assert alignment(tagIDLDESC) == 4, alignment(tagIDLDESC) + IDLDESC = tagIDLDESC # typedef + + class tagSAFEARRAYBOUND(Structure): + _fields_ = [ + ('cElements', DWORD), + ('lLbound', LONG), + ] + assert sizeof(tagSAFEARRAYBOUND) == 8, sizeof(tagSAFEARRAYBOUND) + assert alignment(tagSAFEARRAYBOUND) == 4, alignment(tagSAFEARRAYBOUND) + SAFEARRAYBOUND = tagSAFEARRAYBOUND # typedef + + class tagSAFEARRAY(Structure): + _fields_ = [ + ('cDims', USHORT), + ('fFeatures', USHORT), + ('cbElements', DWORD), + ('cLocks', DWORD), + ('pvData', PVOID), + ('rgsabound', SAFEARRAYBOUND * 1), + ] + assert sizeof(tagSAFEARRAY) == 24, sizeof(tagSAFEARRAY) + assert alignment(tagSAFEARRAY) == 4, alignment(tagSAFEARRAY) + SAFEARRAY = tagSAFEARRAY # typedef + + class tagEXCEPINFO(Structure): + pass + tagEXCEPINFO._fields_ = [ + ('wCode', WORD), + ('wReserved', WORD), + ('bstrSource', BSTR), + ('bstrDescription', BSTR), + ('bstrHelpFile', BSTR), + ('dwHelpContext', DWORD), + ('pvReserved', PVOID), + ('pfnDeferredFillIn', WINFUNCTYPE(HRESULT, POINTER(tagEXCEPINFO))), + ('scode', SCODE), + ] + assert sizeof(tagEXCEPINFO) == 32, sizeof(tagEXCEPINFO) + assert alignment(tagEXCEPINFO) == 4, alignment(tagEXCEPINFO) + EXCEPINFO = tagEXCEPINFO # typedef + + ################################################################ + class ITypeLib(IUnknown): # c:/vc98/include/OAIDL.H 4460 *************** *** 260,266 **** def GetLibAttr(self): p = POINTER(TLIBATTR)() ! self.GetLibAttr._api_(byref(p)) # XXX register for release ! return p.value ## STDMETHOD(HRESULT, 'GetTypeComp', [POINTER(POINTER(ITypeComp))]), --- 323,329 ---- def GetLibAttr(self): p = POINTER(TLIBATTR)() ! self.__com_GetLibAttr(byref(p)) # XXX register for release ! return p ## STDMETHOD(HRESULT, 'GetTypeComp', [POINTER(POINTER(ITypeComp))]), *************** *** 383,389 **** - class tagTLIBATTR(Structure): - pass - TLIBATTR = tagTLIBATTR # typedef class ITypeComp(IUnknown): def Bind(self, p0, p1, p2, p3, p4, p5): --- 446,449 ---- *************** *** 415,429 **** ] - # tagTLIBATTR - tagTLIBATTR._fields_ = [ - ('guid', GUID), - ('lcid', LCID), - ('syskind', SYSKIND), - ('wMajorVerNum', WORD), - ('wMinorVerNum', WORD), - ('wLibFlags', WORD), - ] - assert sizeof(tagTLIBATTR) == 32, sizeof(tagTLIBATTR) - assert alignment(tagTLIBATTR) == 4, alignment(tagTLIBATTR) class tagTYPEATTR(Structure): _owner = None --- 475,478 ---- *************** *** 472,479 **** - class tagEXCEPINFO(Structure): - pass - EXCEPINFO = tagEXCEPINFO # typedef - ITypeInfo._methods_ = [ STDMETHOD(HRESULT, 'GetTypeAttr', [POINTER(POINTER(TYPEATTR))]), --- 521,524 ---- *************** *** 497,514 **** STDMETHOD(None, 'ReleaseVarDesc', [POINTER(VARDESC)]), ] ! # tagEXCEPINFO ! tagEXCEPINFO._fields_ = [ ! ('wCode', WORD), ! ('wReserved', WORD), ! ('bstrSource', BSTR), ! ('bstrDescription', BSTR), ! ('bstrHelpFile', BSTR), ! ('dwHelpContext', DWORD), ! ('pvReserved', PVOID), ! ('pfnDeferredFillIn', WINFUNCTYPE(HRESULT, POINTER(tagEXCEPINFO))), ! ('scode', SCODE), ! ] ! assert sizeof(tagEXCEPINFO) == 32, sizeof(tagEXCEPINFO) ! assert alignment(tagEXCEPINFO) == 4, alignment(tagEXCEPINFO) VARIANTARG = VARIANT # typedef # tagDISPPARAMS --- 542,546 ---- STDMETHOD(None, 'ReleaseVarDesc', [POINTER(VARDESC)]), ] ! VARIANTARG = VARIANT # typedef # tagDISPPARAMS *************** *** 551,565 **** assert alignment(tagTYPEDESC) == 4, alignment(tagTYPEDESC) TYPEDESC = tagTYPEDESC # typedef ! class tagIDLDESC(Structure): ! pass ! # tagIDLDESC ! tagIDLDESC._fields_ = [ ! ('dwReserved', ULONG_PTR), ! ('wIDLFlags', USHORT), ! ] ! assert sizeof(tagIDLDESC) == 8, sizeof(tagIDLDESC) ! assert alignment(tagIDLDESC) == 4, alignment(tagIDLDESC) ! IDLDESC = tagIDLDESC # typedef ! # tagTYPEATTR tagTYPEATTR._fields_ = [ ('guid', GUID), --- 583,587 ---- assert alignment(tagTYPEDESC) == 4, alignment(tagTYPEDESC) TYPEDESC = tagTYPEDESC # typedef ! tagTYPEATTR._fields_ = [ ('guid', GUID), *************** *** 623,629 **** pass - class tagSAFEARRAY(Structure): - pass - SAFEARRAY = tagSAFEARRAY # typedef class tagDEC(Structure): pass --- 645,648 ---- *************** *** 882,906 **** assert sizeof(tagFUNCDESC) == 52, sizeof(tagFUNCDESC) assert alignment(tagFUNCDESC) == 4, alignment(tagFUNCDESC) ! class tagSAFEARRAYBOUND(Structure): ! pass ! # tagSAFEARRAYBOUND ! tagSAFEARRAYBOUND._fields_ = [ ! ('cElements', DWORD), ! ('lLbound', LONG), ! ] ! assert sizeof(tagSAFEARRAYBOUND) == 8, sizeof(tagSAFEARRAYBOUND) ! assert alignment(tagSAFEARRAYBOUND) == 4, alignment(tagSAFEARRAYBOUND) ! SAFEARRAYBOUND = tagSAFEARRAYBOUND # typedef ! # tagSAFEARRAY ! tagSAFEARRAY._fields_ = [ ! ('cDims', USHORT), ! ('fFeatures', USHORT), ! ('cbElements', DWORD), ! ('cLocks', DWORD), ! ('pvData', PVOID), ! ('rgsabound', SAFEARRAYBOUND * 1), ! ] ! assert sizeof(tagSAFEARRAY) == 24, sizeof(tagSAFEARRAY) ! assert alignment(tagSAFEARRAY) == 4, alignment(tagSAFEARRAY) # tagPARAMDESCEX tagPARAMDESCEX._fields_ = [ --- 901,905 ---- assert sizeof(tagFUNCDESC) == 52, sizeof(tagFUNCDESC) assert alignment(tagFUNCDESC) == 4, alignment(tagFUNCDESC) ! # tagPARAMDESCEX tagPARAMDESCEX._fields_ = [ |