// This is aliased as a macro in 32bit Windows. public static IntPtr SetWindowLongPtr(IntPtr hwnd, GWL nIndex, IntPtr dwNewLong) { if (8 == IntPtr.Size) { return(SetWindowLongPtr64(hwnd, nIndex, dwNewLong)); } return(SetWindowLongPtr32(hwnd, nIndex, dwNewLong)); }
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); }
public static IntPtr SetWindowLong(HandleRef hWnd, GWL nIndex, HandleRef dwNewLong) { IntPtr result = SetWindowLong(hWnd.Handle, nIndex, dwNewLong.Handle); GC.KeepAlive(hWnd.Wrapper); GC.KeepAlive(dwNewLong.Wrapper); return(result); }
public static IntPtr SetWindowLong(IntPtr hWnd, GWL nIndex, IntPtr dwNewLong) { if (IntPtr.Size == 4) { return(SetWindowLongW(hWnd, nIndex, dwNewLong)); } return(SetWindowLongPtrW(hWnd, nIndex, dwNewLong)); }
public static IntPtr GetWindowLong(IntPtr hWnd, GWL nIndex) { if (IntPtr.Size == 4) { return(GetWindowLongW(hWnd, nIndex)); } return(GetWindowLongPtrW(hWnd, nIndex)); }
public static int ChangeWindowLong(IntPtr hWnd, GWL nIndex, int mask, int set) // HELPER! { int cur = (GetWindowLong(hWnd, nIndex) & ~mask) | set; SetWindowLong(hWnd, nIndex, cur); //System.Diagnostics.Debug.WriteLine("set exstyle " + cur.ToString("X")); return(cur); }
public static IntPtr SetWindowLongPtr(IntPtr hwnd, GWL nIndex, IntPtr dwNewLong) { if (8 == IntPtr.Size) { return(Standard.NativeMethods.SetWindowLongPtr64(hwnd, nIndex, dwNewLong)); } return(new IntPtr(Standard.NativeMethods.SetWindowLongPtr32(hwnd, nIndex, dwNewLong.ToInt32()))); }
public static nint GetWindowLong(IntPtr hWnd, GWL nIndex) { if (!Environment.Is64BitProcess) { return(GetWindowLongW(hWnd, nIndex)); } return(GetWindowLongPtrW(hWnd, nIndex)); }
public static IntPtr SetWindowLong(IntPtr hWnd, GWL nIndex, nint dwNewLong) { if (!Environment.Is64BitProcess) { return(SetWindowLongW(hWnd, nIndex, dwNewLong)); } return(SetWindowLongPtrW(hWnd, nIndex, dwNewLong)); }
internal static IntPtr SetWindowLongPtr(IntPtr hwnd, GWL nIndex, IntPtr dwNewLong) { if (8 == IntPtr.Size) { return(SetWindowLongPtr64(hwnd, nIndex, dwNewLong)); } return(new IntPtr(SetWindowLongPtr32(hwnd, nIndex, dwNewLong.ToInt32()))); }
public static IntPtr GetWindowLong(IntPtr hWnd, GWL nIndex) { if (IsWindowUnicode(hWnd)) { return(GetWindowLongW(hWnd, nIndex)); } return(GetWindowLongA(hWnd, nIndex)); }
// This is aliased as a macro in 32bit Windows. public static IntPtr GetWindowLongPtr(IntPtr hwnd, GWL nIndex) { if (8 == IntPtr.Size) { return(GetWindowLongPtr64(hwnd, nIndex)); } return(GetWindowLongPtr32(hwnd, nIndex)); }
public static IntPtr SetWindowLongPtr(HWND hwnd, GWL nIndex, IntPtr dwNewLong) { if (IntPtr.Size == 4) { // The SetWindowLongPtr entrypoint may not exist on 32-bit // OSes, so use the legacy SetWindowLong function instead. return(new IntPtr(SetWindowLong(hwnd, nIndex, dwNewLong.ToInt32()))); } return(_SetWindowLongPtr(hwnd, nIndex, dwNewLong)); }
public static IntPtr GetWindowLongPtr(IntPtr hwnd, GWL nIndex) { IntPtr zero = IntPtr.Zero; zero = (8 != IntPtr.Size ? new IntPtr(Standard.NativeMethods.GetWindowLong(hwnd, nIndex)) : Standard.NativeMethods.GetWindowLongPtr_1(hwnd, nIndex)); if (IntPtr.Zero == zero) { throw new Win32Exception(); } return(zero); }
public static IntPtr SetWindowLongPtr(IntPtr hWnd, GWL nIndex, IntPtr dwNewLong) { if (Environment.Is64BitProcess) { return(SetWindowLongPtr64(hWnd, nIndex, dwNewLong)); } else { return(new IntPtr(SetWindowLong32(hWnd, nIndex, dwNewLong.ToInt32()))); } }
public static IntPtr GetWindowLongPtr(IntPtr hWnd, GWL nIndex) { if (Environment.Is64BitProcess) { return(GetWindowLongPtr64(hWnd, nIndex)); } else { return(GetWindowLongPtr32(hWnd, nIndex)); } }
/// <summary> /// Sets the window to <see cref="GWL"/> and <paramref name="style"/> via pointer /// </summary> /// <param name="hwnd">The HWND.</param> /// <param name="gwlIndex">Index of the GWL.</param> /// <param name="style">The style.</param> internal static IntPtr SetWindowLongPtr(IntPtr hwnd, GWL gwlIndex, IntPtr style) { if (Environment.Is64BitProcess == true) { return(SetWindowLongPtr64(hwnd, gwlIndex, style)); } else { return(new IntPtr(SetWindowLongPtr32(hwnd, gwlIndex, style.ToInt32()))); } }
// This static method is required because legacy OSes do not support // SetWindowLongPtr public static IntPtr SetWindowLongPtr(IntPtr hWnd, GWL nIndex, IntPtr dwNewLong) { if (IntPtr.Size == 8) { return(SetWindowLongPtr64(hWnd, nIndex, dwNewLong)); } else { return(new IntPtr(SetWindowLong32(hWnd, nIndex, dwNewLong.ToInt32()))); } }
// This static method is required because Win32 does not support // GetWindowLongPtr directly public static IntPtr GetWindowLongPtr(IntPtr hWnd, GWL nIndex) { if (IntPtr.Size == 8) { return(GetWindowLongPtr64(hWnd, (int)nIndex)); } else { return(GetWindowLongPtr32(hWnd, (int)nIndex)); } }
public static IntPtr GetWindowLongPtr(IntPtr hWnd, GWL nIndex) { var res = (8 == IntPtr.Size) ? _GetWindowLongPtr64(hWnd, nIndex) : new IntPtr(_GetWindowLong32(hWnd, nIndex)); if (IntPtr.Zero == res) { throw new Win32Exception(); } return(res); }
internal static IntPtr GetWindowLongPtr(IntPtr hwnd, GWL nIndex) { var ret = 8 == IntPtr.Size ? GetWindowLongPtr64(hwnd, nIndex) : GetWindowLongPtr32(hwnd, nIndex); if (IntPtr.Zero == ret) { throw new Win32Exception(); } return(ret); }
public static IntPtr GetWindowLongPtr(HWND hwnd, GWL nIndex) { if (IntPtr.Size == 4) { // The SetWindowLongPtr entrypoint may not exist on 32-bit // OSes, so use the legacy SetWindowLong function instead. return(new IntPtr(GetWindowLong(hwnd, nIndex))); } else { return(_GetWindowLongPtr(hwnd, nIndex)); } }
public static IntPtr SetWindowLongPtr64(IntPtr hWnd, GWL nIndex, IntPtr dwNewLong) { switch (nIndex) { case GWL.EXSTYLE: return(SetWindowExStyle(hWnd, dwNewLong)); default: break; } NotImplemented(MethodBase.GetCurrentMethod()); return(IntPtr.Zero); }
public static IntPtr GetWindowLongPtr(IntPtr hwnd, GWL nIndex) { IntPtr intPtr = IntPtr.Zero; if (8 == IntPtr.Size) { intPtr = NativeMethodsSetLastError.GetWindowLongPtr(hwnd, (int)nIndex); } else { intPtr = new IntPtr(NativeMethodsSetLastError.GetWindowLong(hwnd, (int)nIndex)); } if (IntPtr.Zero == intPtr) { throw new Win32Exception(); } return(intPtr); }
public static IntPtr GetWindowLongPtr(IntPtr hwnd, GWL nIndex) { IntPtr ret = IntPtr.Zero; if (8 == IntPtr.Size) { ret = GetWindowLongPtr64(hwnd, nIndex); } else { ret = new IntPtr(GetWindowLongPtr32(hwnd, nIndex)); } if (IntPtr.Zero == ret) { throw new Win32Exception(); } return(ret); }
/// <summary> /// Gets the pointer to window /// </summary> /// <param name="hwnd">The HWND.</param> /// <param name="gwlIndex">Index of the GWL.</param> /// <returns>Pointer to window</returns> /// <exception cref="Win32Exception"></exception> internal static IntPtr GetWindowLongPtr(IntPtr hwnd, GWL gwlIndex) { IntPtr ret = IntPtr.Zero; if (Environment.Is64BitProcess == true) { ret = GetWindowLongPtr64(hwnd, gwlIndex); } else { ret = new IntPtr(GetWindowLongPtr32(hwnd, gwlIndex)); } if (ret == IntPtr.Zero) { throw new Win32Exception(); } return(ret); }
internal static IntPtr GetWindowLongPtr(HandleRef hWnd, GWL nIndex) { IntPtr zero = IntPtr.Zero; int num = 0; SetLastError(0); if (IntPtr.Size == 4) { int num2 = IntGetWindowLong(hWnd, (int)nIndex); num = Marshal.GetLastWin32Error(); zero = new IntPtr(num2); } else { zero = IntGetWindowLongPtr(hWnd, (int)nIndex); num = Marshal.GetLastWin32Error(); } if (zero == IntPtr.Zero) { } return(zero); }
public static IntPtr SetWindowLongPtr(HWND hwnd, GWL nIndex, IntPtr dwNewLong) { if (IntPtr.Size == 4) { // The SetWindowLongPtr entrypoint may not exist on 32-bit // OSes, so use the legacy SetWindowLong function instead. return new IntPtr(SetWindowLong(hwnd, nIndex, dwNewLong.ToInt32())); } else { return _SetWindowLongPtr(hwnd, nIndex, dwNewLong); } }
private static extern int GetWindowLongPtr32(IntPtr hWnd, GWL nIndex);
public static IntPtr GetWindowLongPtr(IntPtr hwnd, GWL nIndex) { IntPtr ret = IntPtr.Zero; if (8 == IntPtr.Size) { ret = GetWindowLongPtr64(hwnd, nIndex); } else { ret = new IntPtr(GetWindowLongPtr32(hwnd, nIndex)); } if (IntPtr.Zero == ret) { throw new Win32Exception(); } return ret; }
public static extern int GetWindowLong(IntPtr hWnd, GWL nIndex);
internal static IntPtr GetWindowLongPtr(HandleRef hWnd, GWL nIndex) { IntPtr zero = IntPtr.Zero; int num = 0; SetLastError(0); if (IntPtr.Size == 4) { int num2 = IntGetWindowLong(hWnd, (int)nIndex); num = Marshal.GetLastWin32Error(); zero = new IntPtr(num2); } else { zero = IntGetWindowLongPtr(hWnd, (int)nIndex); num = Marshal.GetLastWin32Error(); } if (zero == IntPtr.Zero) { } return zero; }
public static IntPtr GetWindowLongPtr(IntPtr hwnd, GWL nIndex) { IntPtr ret = IntPtr.Zero; if (8 == IntPtr.Size) { ret = NativeMethodsSetLastError.GetWindowLongPtr(hwnd, (int)nIndex); } else { ret = new IntPtr(NativeMethodsSetLastError.GetWindowLong(hwnd, (int)nIndex)); } if (IntPtr.Zero == ret) { throw new Win32Exception(); } return ret; }
public static IntPtr GetWindowLongPtr(IntPtr hwnd, GWL nIndex) { if (8 == IntPtr.Size) { return GetWindowLongPtr64(hwnd, nIndex); } return GetWindowLongPtr32(hwnd, nIndex); }
/// <summary> /// /// </summary> /// <param name="hwnd"></param> /// <param name="index"></param> /// <param name="nValue"></param> public static void SetWindowLong(IntPtr hwnd, GWL index, int nValue) { NativeMethods.SetWindowLong(hwnd, index, nValue); }
public static extern WindowStylesEx GetWindowLong(IntPtr hwnd, GWL index);
public static extern int SetWindowLong(IntPtr hWnd, GWL nIndex, WS_EX dsNewLong);
internal static extern uint SetWindowLong(IntPtr hwnd, GWL nIndex, uint dwNewLong);
public static extern int GetWindowLong(HWND hwnd, GWL nIndex);
public static IntPtr GetWindowLongPtr(HWND hwnd, GWL nIndex) { if (IntPtr.Size == 4) { // The SetWindowLongPtr entrypoint may not exist on 32-bit // OSes, so use the legacy SetWindowLong function instead. return new IntPtr(GetWindowLong(hwnd, nIndex)); } else { return _GetWindowLongPtr(hwnd, nIndex); } }
private static extern IntPtr _SetWindowLongPtr(HWND hwnd, GWL nIndex, IntPtr dwNewLong);
private static extern IntPtr _GetWindowLongPtr(HWND hwnd, GWL nIndex);
/// <summary> /// Gets a window long pointer. /// </summary> /// <param name="hWnd">The window handle.</param> /// <param name="nIndex">Index of the data to retreive.</param> /// <returns>IntPtr of retreived data.</returns> public static IntPtr GetWindowLongPtr(IntPtr hWnd, GWL nIndex) { if (IntPtr.Size == 8) return GetWindowLongPtr64(hWnd, nIndex); else return GetWindowLongPtr32(hWnd, nIndex); }
private static extern int SetWindowLongPtr32(IntPtr hWnd, GWL nIndex, int dwNewLong);
/// <summary> /// /// </summary> /// <param name="hwnd"></param> /// <param name="index"></param> /// <returns></returns> public static int GetWindowLong(IntPtr hwnd, GWL index) { return NativeMethods.GetWindowLong(hwnd, index); }
internal static extern WS GetWindowLong(IntPtr hWnd, GWL nIndex);
public static extern IntPtr SubclassWindow(IntPtr hWnd, GWL nIndex, WindowProcDelegate dwNewLong);
internal static extern int SetWindowLong(IntPtr hWnd, GWL nIndex, WS dwNewLong);
public static IntPtr SetWindowLongPtr(IntPtr hwnd, GWL nIndex, IntPtr dwNewLong) { if (8 == IntPtr.Size) { return NativeMethodsSetLastError.SetWindowLongPtr(hwnd, (int)nIndex, dwNewLong); } return new IntPtr(NativeMethodsSetLastError.SetWindowLong(hwnd, (int)nIndex, dwNewLong.ToInt32())); }
public static extern IntPtr SubclassWindow(IntPtr hWnd, GWL nIndex, IntPtr dwNewLong);
public static extern IntPtr SetWindowLongPtrW(IntPtr hWnd, GWL nIndex, IntPtr dwNewLong);
public static extern int SetWindowLong(IntPtr hWnd, GWL nIndex, int dwNewLong);
public static IntPtr SetWindowLongPtr(IntPtr hwnd, GWL nIndex, IntPtr dwNewLong) { if (8 == IntPtr.Size) { return SetWindowLongPtr64(hwnd, nIndex, dwNewLong); } return new IntPtr(SetWindowLongPtr32(hwnd, nIndex, dwNewLong.ToInt32())); }
public static extern int SetWindowLong(IntPtr hWnd, GWL nIndex, WindowStylesEx dwNewLong);
private static extern IntPtr GetWindowLongPtr64(IntPtr hWnd, GWL nIndex);
public static extern int SetWindowLong(HWND hwnd, GWL nIndex, int dwNewLong);
private static extern IntPtr SetWindowLongPtr64(IntPtr hWnd, GWL nIndex, IntPtr dwNewLong);
public extern static IntPtr SetWindowLong(IntPtr hwnd, GWL nIndex, IntPtr dwNewLong);