LONGLONG = Alias("LONGLONG", LongLong)
FLOAT = Alias("FLOAT", Float)
-INT32 = Literal("INT32", "UInt")
+INT32 = Literal("INT32", "SInt")
UINT32 = Literal("UINT32", "UInt")
BYTE = Literal("BYTE", "UInt", base=16)
WORD = Literal("WORD", "UInt", base=16)
DWORD = Literal("DWORD", "UInt", base=16)
+
BOOL = Alias("BOOL", Bool)
LPLONG = Pointer(LONG)
LPWORD = Pointer(WORD)
LPDWORD = Pointer(DWORD)
LPBOOL = Pointer(BOOL)
-LPSIZE = LPDWORD
LPSTR = CString
LPCSTR = Const(CString)
(DWORD, "Data1"),
(WORD, "Data2"),
(WORD, "Data3"),
- (BYTE, "Data4[0]"),
- (BYTE, "Data4[1]"),
- (BYTE, "Data4[2]"),
- (BYTE, "Data4[3]"),
- (BYTE, "Data4[4]"),
- (BYTE, "Data4[5]"),
- (BYTE, "Data4[6]"),
- (BYTE, "Data4[7]"),
+ (Array(BYTE, "8"), "Data4"),
])
LPGUID = Pointer(GUID)
))
LPPOINT = Pointer(POINT)
+SIZE = Struct("SIZE", (
+ (LONG, "cx"),
+ (LONG, "cy"),
+))
+LPSIZE = Pointer(SIZE)
+
RECT = Struct("RECT", (
(LONG, "left"),
(LONG, "top"),
IUnknown = Interface("IUnknown")
+HRESULT_com = FakeEnum(HRESULT, [
+ "S_OK",
+ "E_NOINTERFACE",
+ "E_POINTER",
+])
+
IUnknown.methods = (
- Method(HRESULT, "QueryInterface", ((REFIID, "riid"), (Pointer(OpaquePointer(Void)), "ppvObj"))),
+ Method(HRESULT_com, "QueryInterface", ((REFIID, "riid"), Out(Pointer(OpaquePointer(Void)), "ppvObj"))),
Method(ULONG, "AddRef", ()),
Method(ULONG, "Release", ()),
)