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.txt content:
Windows.Win32.UI.WindowsAndMessaging
-
NativeMethods.json content (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
Actual behavior
SetWindowLongis generated, butSetWindowLongPtris not.Expected behavior
SetWindowLongPtrshould be generated to be able to set a pointer value on window.Repro steps
NativeMethods.txtcontent:NativeMethods.jsoncontent (if present):N/A
Any of your own code that should be shared?
Context
LangVersion(if explicitly set by project): 10.0