public static IntPtr SetWindowLong(IntPtr hWnd, GWLIndex nIndex, IntPtr dwNewLong) { if (IntPtr.Size == 8) // 64 位 { return(SetWindowLongPtr(hWnd, (int)nIndex, dwNewLong)); } else // 32 位 { return(SetWindowLong(hWnd, (int)nIndex, dwNewLong)); } }
public static extern int SetWindowLong(IntPtr hWnd, GWLIndex nIndex, int dwNewLong);
public static extern int GetWindowLong(IntPtr hWnd, GWLIndex nIndex);