X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=specs%2Fwinapi.py;h=be50155180e4aa419b6bf20fff299db743be1c29;hb=8b095e5763690867bdc5e8ae204e0712a669b880;hp=0941118f08310ddbad3e3e7ea1e889290c47a602;hpb=73841adafcb04f024dc6cca84a71af2f302b2385;p=apitrace diff --git a/specs/winapi.py b/specs/winapi.py index 0941118..be50155 100644 --- a/specs/winapi.py +++ b/specs/winapi.py @@ -51,6 +51,7 @@ BYTE = Alias("BYTE", UInt8) WORD = Alias("WORD", UInt16) DWORD = Alias("DWORD", UInt32) +UCHAR = Alias("UCHAR", UChar) WCHAR = Alias("WCHAR", Short) BOOL = Enum("BOOL", [ @@ -64,9 +65,9 @@ LPDWORD = Pointer(DWORD) LPBOOL = Pointer(BOOL) LPSTR = CString -LPCSTR = Const(CString) +LPCSTR = ConstCString LPWSTR = WString -LPCWSTR = Const(WString) +LPCWSTR = ConstWString LARGE_INTEGER = Struct("LARGE_INTEGER", [ (LONGLONG, 'QuadPart'), @@ -75,8 +76,9 @@ LARGE_INTEGER = Struct("LARGE_INTEGER", [ SIZE_T = Alias("SIZE_T", SizeT) VOID = Void -PVOID = Opaque("PVOID") +PVOID = OpaquePointer(VOID) LPVOID = PVOID +LPCVOID = OpaquePointer(Const(VOID)) def DECLARE_HANDLE(expr): return Handle(expr, IntPointer(expr)) @@ -150,7 +152,7 @@ RGNDATA = Struct("RGNDATA", [ ]) LPRGNDATA = Pointer(RGNDATA) -HMODULE = DECLARE_HANDLE("HMODULE") +HMODULE = IntPointer("HMODULE") FILETIME = Struct("FILETIME", [ (DWORD, "dwLowDateTime"), @@ -176,6 +178,11 @@ LOGFONTW = Struct("LOGFONTW", [ (WString, "lfFaceName"), ]) +SECURITY_ATTRIBUTES = Struct("SECURITY_ATTRIBUTES", [ + (DWORD, "nLength"), + (LPVOID, "lpSecurityDescriptor"), + (BOOL, "bInheritHandle"), +]) # http://msdn.microsoft.com/en-us/library/ff485842.aspx # http://msdn.microsoft.com/en-us/library/windows/desktop/ms681381.aspx @@ -203,9 +210,9 @@ HRESULT = MAKE_HRESULT([]) IUnknown = Interface("IUnknown") IUnknown.methods = ( - Method(HRESULT, "QueryInterface", ((REFIID, "riid"), Out(Pointer(ObjPointer(Void)), "ppvObj"))), - Method(ULONG, "AddRef", ()), - Method(ULONG, "Release", ()), + StdMethod(HRESULT, "QueryInterface", ((REFIID, "riid"), Out(Pointer(ObjPointer(Void)), "ppvObj"))), + StdMethod(ULONG, "AddRef", ()), + StdMethod(ULONG, "Release", ()), )