diff --git a/core/sys/windows/ole32.odin b/core/sys/windows/ole32.odin index d344db5f0..3ff86b9fc 100644 --- a/core/sys/windows/ole32.odin +++ b/core/sys/windows/ole32.odin @@ -7,13 +7,13 @@ foreign import "system:Ole32.lib" /* typedef enum tagCOINIT { - COINIT_APARTMENTTHREADED = 0x2, // Apartment model + COINIT_APARTMENTTHREADED = 0x2, // Apartment model #if (_WIN32_WINNT >= 0x0400 ) || defined(_WIN32_DCOM) // DCOM - // These constants are only valid on Windows NT 4.0 - COINIT_MULTITHREADED = COINITBASE_MULTITHREADED, - COINIT_DISABLE_OLE1DDE = 0x4, // Don't use DDE for Ole1 support. - COINIT_SPEED_OVER_MEMORY = 0x8, // Trade memory for speed. + // These constants are only valid on Windows NT 4.0 + COINIT_MULTITHREADED = COINITBASE_MULTITHREADED, + COINIT_DISABLE_OLE1DDE = 0x4, // Don't use DDE for Ole1 support. + COINIT_SPEED_OVER_MEMORY = 0x8, // Trade memory for speed. #endif // DCOM } COINIT; */ @@ -26,9 +26,11 @@ COINIT :: enum DWORD { } IUnknown :: struct { - using Vtbl: ^IUnknownVtbl, + using _iunknown_vtable: ^IUnknown_VTable, } -IUnknownVtbl :: struct { + +IUnknownVtbl :: IUnknown_VTable +IUnknown_VTable :: struct { QueryInterface: proc "system" (This: ^IUnknown, riid: REFIID, ppvObject: ^rawptr) -> HRESULT, AddRef: proc "system" (This: ^IUnknown) -> ULONG, Release: proc "system" (This: ^IUnknown) -> ULONG, diff --git a/vendor/directx/dxgi/dxgi.odin b/vendor/directx/dxgi/dxgi.odin index 235e07633..5b6137cee 100644 --- a/vendor/directx/dxgi/dxgi.odin +++ b/vendor/directx/dxgi/dxgi.odin @@ -29,14 +29,9 @@ SIZE :: win32.SIZE WCHAR :: win32.WCHAR DWORD :: win32.DWORD -IUnknown :: struct { - using _iunknown_vtable: ^IUnknown_VTable, -} -IUnknown_VTable :: struct { - QueryInterface: proc "system" (this: ^IUnknown, riid: ^IID, ppvObject: ^rawptr) -> HRESULT, - AddRef: proc "system" (this: ^IUnknown) -> ULONG, - Release: proc "system" (this: ^IUnknown) -> ULONG, -} +IUnknown :: win32.IUnknown +IUnknown_VTable :: win32.IUnknown_VTable +LPUNKNOWN :: win32.LPUNKNOWN @(default_calling_convention="system") foreign dxgi {