[ctypes-commit] ctypes/comtypes typeinfo.py,1.3.2.10,1.3.2.11
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2006-01-04 19:44:06
|
Update of /cvsroot/ctypes/ctypes/comtypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18434 Modified Files: Tag: branch_1_0 typeinfo.py Log Message: Don't use the decorators. Index: typeinfo.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/comtypes/typeinfo.py,v retrieving revision 1.3.2.10 retrieving revision 1.3.2.11 diff -C2 -d -r1.3.2.10 -r1.3.2.11 *** typeinfo.py 2 Jan 2006 19:11:25 -0000 1.3.2.10 --- typeinfo.py 4 Jan 2006 19:43:56 -0000 1.3.2.11 *************** *** 372,425 **** ################################################################ # functions ! def LoadRegTypeLib(guid, wVerMajor, wVerMinor, lcid=0): "Load a registered type library" tlib = POINTER(ITypeLib)() ! LoadRegTypeLib._api_(byref(GUID(guid)), wVerMajor, wVerMinor, lcid, byref(tlib)) return tlib - LoadRegTypeLib = stdcall(HRESULT, 'oleaut32', - [POINTER(GUID), c_ushort, c_ushort, c_ulong, POINTER(POINTER(ITypeLib))]) (LoadRegTypeLib) def LoadTypeLibEx(szFile, regkind=REGKIND_NONE): "Load, and optionally register a type library file" ptl = POINTER(ITypeLib)() ! LoadTypeLibEx._api_(szFile, regkind, byref(ptl)) return ptl - LoadTypeLibEx = stdcall(HRESULT, 'oleaut32', [POINTER(OLECHAR), tagREGKIND, POINTER(POINTER(ITypeLib))]) (LoadTypeLibEx) def LoadTypeLib(szFile): "Load and register a type library file" tlib = POINTER(ITypeLib)() ! LoadTypeLib._api_(szFile, byref(tlib)) return tlib - LoadTypeLib = stdcall(HRESULT, 'oleaut32', [POINTER(OLECHAR), POINTER(POINTER(ITypeLib))]) (LoadTypeLib) def UnRegisterTypeLib(libID, wVerMajor, wVerMinor, lcid=0, syskind=SYS_WIN32): "Unregister a registered type library" ! return UnRegisterTypeLib._api_(byref(GUID(libID)), wVerMajor, wVerMinor, lcid, syskind) ! UnRegisterTypeLib = stdcall(HRESULT, 'oleaut32', ! [POINTER(GUID), c_ushort, c_ushort, c_ulong, tagSYSKIND]) (UnRegisterTypeLib) def RegisterTypeLib(tlib, fullpath, helpdir=None): "Register a type library in the registry" ! return RegisterTypeLib._api_(tlib, fullpath, helpdir) ! RegisterTypeLib = stdcall(HRESULT, 'oleaut32', [POINTER(ITypeLib), POINTER(OLECHAR), POINTER(OLECHAR)]) (RegisterTypeLib) ! def CreateTypeLib(filename, syskind=SYS_WIN32): "Return a ICreateTypeLib pointer" ctlib = POINTER(ICreateTypeLib)() ! CreateTypeLib._api_(syskind, filename, byref(ctlib)) return ctlib - CreateTypeLib = stdcall(HRESULT, 'oleaut32', - [tagSYSKIND, POINTER(OLECHAR), POINTER(POINTER(ICreateTypeLib))]) (CreateTypeLib) def QueryPathOfRegTypeLib(libid, wVerMajor, wVerMinor, lcid=0): "Return the path of a registered type library" pathname = BSTR() ! QueryPathOfRegTypeLib._api_(byref(GUID(libid)), wVerMajor, wVerMinor, lcid, byref(pathname)) return pathname.value - QueryPathOfRegTypeLib = stdcall(HRESULT, 'oleaut32', - [POINTER(GUID), c_ushort, c_ushort, c_ulong, POINTER(BSTR)]) (QueryPathOfRegTypeLib) ################################################################ --- 372,414 ---- ################################################################ # functions + _oleaut32 = oledll.oleaut32 ! def LoadRegTypeLib(guid, wMajorVerNum, wMinorVerNum, lcid=0): "Load a registered type library" tlib = POINTER(ITypeLib)() ! _oleaut32.LoadRegTypeLib(byref(GUID(guid)), wMajorVerNum, wMinorVerNum, lcid, byref(tlib)) return tlib def LoadTypeLibEx(szFile, regkind=REGKIND_NONE): "Load, and optionally register a type library file" ptl = POINTER(ITypeLib)() ! _oleaut32.LoadTypeLibEx(c_wchar_p(szFile), regkind, byref(ptl)) return ptl def LoadTypeLib(szFile): "Load and register a type library file" tlib = POINTER(ITypeLib)() ! _oleaut32.LoadTypeLib(c_wchar_p(szFile), byref(tlib)) return tlib def UnRegisterTypeLib(libID, wVerMajor, wVerMinor, lcid=0, syskind=SYS_WIN32): "Unregister a registered type library" ! return _oleaut32.UnRegisterTypeLib(byref(GUID(libID)), wVerMajor, wVerMinor, lcid, syskind) def RegisterTypeLib(tlib, fullpath, helpdir=None): "Register a type library in the registry" ! return _oleaut32.RegisterTypeLib(tlib, c_wchar_p(fullpath), c_wchar_p(helpdir)) def CreateTypeLib(filename, syskind=SYS_WIN32): "Return a ICreateTypeLib pointer" ctlib = POINTER(ICreateTypeLib)() ! _oleaut32.CreateTypeLib(syskind, c_wchar_p(filename), byref(ctlib)) return ctlib def QueryPathOfRegTypeLib(libid, wVerMajor, wVerMinor, lcid=0): "Return the path of a registered type library" pathname = BSTR() ! _oleaut32.QueryPathOfRegTypeLib(byref(GUID(libid)), wVerMajor, wVerMinor, lcid, byref(pathname)) return pathname.value ################################################################ |