X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=specs%2Fwinapi.py;h=be50155180e4aa419b6bf20fff299db743be1c29;hb=673d32acddf58cce02525243d9eb0057b372c0e2;hp=409054d12775fb333bcd469407f2af6308a4e96c;hpb=d93791ef6ea04f6ab5bce29aacff74e75b4035a5;p=apitrace diff --git a/specs/winapi.py b/specs/winapi.py index 409054d..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'), @@ -77,6 +78,7 @@ SIZE_T = Alias("SIZE_T", SizeT) VOID = Void 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", (), sideeffects=False), - Method(ULONG, "Release", ()), + StdMethod(HRESULT, "QueryInterface", ((REFIID, "riid"), Out(Pointer(ObjPointer(Void)), "ppvObj"))), + StdMethod(ULONG, "AddRef", ()), + StdMethod(ULONG, "Release", ()), )