-
Notifications
You must be signed in to change notification settings - Fork 119
SetWindowLongPtr is not generated #528
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Actual behavior
SetWindowLong is generated, but SetWindowLongPtr is not.
Expected behavior
SetWindowLongPtr should be generated to be able to set a pointer value on window.
Repro steps
NativeMethods.txtcontent:
Windows.Win32.UI.WindowsAndMessaging
-
NativeMethods.jsoncontent (if present):
N/A -
Any of your own code that should be shared?
unsafe private static LRESULT WindowProcedure(HWND window, uint message, WPARAM wparam, LPARAM lparam)
{
if (message == PInvoke.WM_CREATE)
{
var createStruct = (CREATESTRUCTW*)lparam.Value;
PInvoke.SetWindowLongPtr(window, WINDOW_LONG_PTR_INDEX.GWLP_USERDATA, (IntPtr)(*createStruct).lpCreateParams);
}
return PInvoke.DefWindowProc(window, message, wparam, lparam);
}Context
- CsWin32 version: 0.1.635-beta
- Win32Metadata version (if explicitly set by project): N/A
- Target Framework: net6.0
LangVersion(if explicitly set by project): 10.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working