public static IntPtr SetWindowLong(IntPtr hWnd, GWL nIndex, WNDPROCINT dwNewLong) { IntPtr pointer = Marshal.GetFunctionPointerForDelegate(dwNewLong); IntPtr result = SetWindowLong(hWnd, nIndex, pointer); return(result); }
public static IntPtr SetWindowLong(HandleRef hWnd, GWL nIndex, WNDPROCINT dwNewLong) { IntPtr pointer = Marshal.GetFunctionPointerForDelegate(dwNewLong); IntPtr result = SetWindowLong(hWnd.Handle, nIndex, pointer); GC.KeepAlive(hWnd.Wrapper); return(result); }