diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2024-03-31 20:41:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-31 20:41:13 +0200 |
| commit | 0d8dadb0840ced094383193b7fc22dd86d41e403 (patch) | |
| tree | 84de6b9ef8d6eb7c757d02147d2f98f69f94c2fa | |
| parent | 2bdf5f58ef162a74e132e9a2277aaecccca0df4b (diff) | |
| parent | d0674cb70faec3048fece12a8cc72c31494050e9 (diff) | |
Merge pull request #3357 from DragosPopse/win32-coinit-fix
Fixed windows.COINIT.MULTITHREADED declaration.
| -rw-r--r-- | core/sys/windows/ole32.odin | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/core/sys/windows/ole32.odin b/core/sys/windows/ole32.odin index 6fa398d46..d344db5f0 100644 --- a/core/sys/windows/ole32.odin +++ b/core/sys/windows/ole32.odin @@ -3,9 +3,24 @@ package sys_windows foreign import "system:Ole32.lib" //objbase.h +// Note(Dragos): https://learn.microsoft.com/en-us/windows/win32/api/objbase/ne-objbase-coinit makes you believe that MULTITHREADED == 3. That is wrong. See definition of objbase.h +/* +typedef enum tagCOINIT +{ + 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. +#endif // DCOM +} COINIT; +*/ +// Where COINITBASE_MULTITHREADED == 0x00 COINIT :: enum DWORD { APARTMENTTHREADED = 0x2, - MULTITHREADED, + MULTITHREADED = 0, DISABLE_OLE1DDE = 0x4, SPEED_OVER_MEMORY = 0x8, } |