mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-26 16:23:55 +00:00
Unify IUnknown COM interface
This commit is contained in:
@@ -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,
|
||||
|
||||
11
vendor/directx/dxgi/dxgi.odin
vendored
11
vendor/directx/dxgi/dxgi.odin
vendored
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user