marlersoft/zigwin32

`HGLOBAL` (a `HANDLE`) gets bound as `isize`

Opened this issue · 0 comments

Noticed this in the STGMEDIUM binding:

zigwin32/win32/system/com.zig

Lines 3735 to 3747 in 18c9630

pub const STGMEDIUM = extern struct {
tymed: u32,
Anonymous: extern union {
hBitmap: ?HBITMAP,
hMetaFilePict: ?*anyopaque,
hEnhMetaFile: ?HENHMETAFILE,
hGlobal: isize,
lpszFileName: ?PWSTR,
pstm: ?*IStream,
pstg: ?*IStorage,
},
pUnkForRelease: ?*IUnknown,
};

It seems like the json generated treats the HGLOBAL as IntPtr:

https://github.com/marlersoft/win32json/blob/a0cef2ae9d4c2a46cb9cf16aafaad5e470fa1cee/api/System.Com.json#L4903

My minwindef.h defines it as:

typedef HANDLE              HGLOBAL;