Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HGLOBAL (a HANDLE) gets bound as isize #11

Open
squeek502 opened this issue Apr 4, 2022 · 0 comments
Open

HGLOBAL (a HANDLE) gets bound as isize #11

squeek502 opened this issue Apr 4, 2022 · 0 comments

Comments

@squeek502
Copy link

squeek502 commented Apr 4, 2022

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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant