Exemplo n.º 1
0
 internal static IntPtr SetWindowLong_N(IntPtr handle, GetWindowLongOffsets item, IntPtr newValue)
 {
     return(IntPtr.Size == 4 ? (IntPtr)SetWindowLong(handle, item, newValue.ToInt32()) :
            SetWindowLongPtr(handle, item, newValue));
 }
Exemplo n.º 2
0
 static extern LONG_PTR SetWindowLongPtrInternal(HWND hWnd, GetWindowLongOffsets nIndex,
     [MarshalAs(UnmanagedType.FunctionPtr)]WindowProcedure dwNewLong);
Exemplo n.º 3
0
 static extern ULONG GetWindowLongInternal(HWND hWnd, GetWindowLongOffsets nIndex);
Exemplo n.º 4
0
 internal static extern LONG_PTR GetWindowLongPtr(
     HWND hWnd,
     GetWindowLongOffsets nIndex
 );
Exemplo n.º 5
0
 static extern LONG SetWindowLongInternal(HWND hWnd, GetWindowLongOffsets nIndex, LONG dwNewLong);
Exemplo n.º 6
0
 private static UIntPtr GetWindowLongPtrInternal(IntPtr hWnd, GetWindowLongOffsets nIndex);
Exemplo n.º 7
0
 private static IntPtr SetWindowLongPtr(IntPtr hWnd, GetWindowLongOffsets nIndex, IntPtr dwNewLong);
Exemplo n.º 8
0
 public static extern long GetWindowLong(IntPtr hWnd, GetWindowLongOffsets nIndex);
Exemplo n.º 9
0
 private static extern IntPtr SetWindowLongPtrInternal(IntPtr hWnd, GetWindowLongOffsets nIndex, IntPtr dwNewLong);
Exemplo n.º 10
0
 static extern UIntPtr GetWindowLongPtr(IntPtr hWnd, GetWindowLongOffsets nIndex);
Exemplo n.º 11
0
 static extern int SetWindowLongInternal(IntPtr hWnd, GetWindowLongOffsets nIndex, int dwNewLong);
Exemplo n.º 12
0
 static extern uint GetWindowLong(IntPtr hWnd, GetWindowLongOffsets nIndex);
Exemplo n.º 13
0
 internal static UIntPtr GetWindowLong_N(IntPtr handle, GetWindowLongOffsets index)
 {
     return(IntPtr.Size == 4 ? (UIntPtr)GetWindowLong(handle, index) : GetWindowLongPtr(handle, index));
 }
Exemplo n.º 14
0
 static extern IntPtr SetWindowLongPtr(IntPtr hWnd, GetWindowLongOffsets nIndex, IntPtr dwNewLong);
Exemplo n.º 15
0
 internal static IntPtr SetWindowLong(IntPtr handle, GetWindowLongOffsets item, IntPtr newValue)
 {
     IntPtr num = IntPtr.Zero;
       Functions.SetLastError(0);
       num = IntPtr.Size != 4 ? Functions.SetWindowLongPtr(handle, item, newValue) : new IntPtr(Functions.SetWindowLong(handle, item, newValue.ToInt32()));
       if (num == IntPtr.Zero)
       {
     int lastWin32Error = Marshal.GetLastWin32Error();
     if (lastWin32Error != 0)
       throw new PlatformException(string.Format("Failed to modify window border. Error: {0}", (object) lastWin32Error));
       }
       return num;
 }
Exemplo n.º 16
0
 internal static UIntPtr GetWindowLong_N(IntPtr handle, GetWindowLongOffsets index)
 {
     return IntPtr.Size == 4 ? (UIntPtr)GetWindowLong(handle, index) : GetWindowLongPtr(handle, index);
 }
Exemplo n.º 17
0
 private static uint GetWindowLongInternal(IntPtr hWnd, GetWindowLongOffsets nIndex);
Exemplo n.º 18
0
 internal static IntPtr SetWindowLong_N(IntPtr handle, GetWindowLongOffsets item, IntPtr newValue)
 {
     return IntPtr.Size == 4 ? (IntPtr)SetWindowLong(handle, item, newValue.ToInt32()) :
         SetWindowLongPtr(handle, item, newValue);
 }
Exemplo n.º 19
0
 private static int SetWindowLong(IntPtr hWnd, GetWindowLongOffsets nIndex, int dwNewLong);
Exemplo n.º 20
0
 static extern uint GetWindowLong(IntPtr hWnd, GetWindowLongOffsets nIndex);
Exemplo n.º 21
0
 private static IntPtr SetWindowLongPtr(IntPtr hWnd, GetWindowLongOffsets nIndex, [MarshalAs(UnmanagedType.FunctionPtr)] WindowProcedure dwNewLong);
Exemplo n.º 22
0
 static extern UIntPtr GetWindowLongPtr(IntPtr hWnd, GetWindowLongOffsets nIndex);
Exemplo n.º 23
0
        // SetWindowLongPtr does not exist on x86 platforms (it's a macro that resolves to SetWindowLong).
        // We need to detect if we are on x86 or x64 at runtime and call the correct function
        // (SetWindowLongPtr on x64 or SetWindowLong on x86). Fun!
        internal static IntPtr SetWindowLong(IntPtr handle, GetWindowLongOffsets item, IntPtr newValue)
        {
            // SetWindowPos defines its error condition as an IntPtr.Zero retval and a non-0 GetLastError.
            // We need to SetLastError(0) to ensure we are not detecting on older error condition (from another function).

            IntPtr retval = IntPtr.Zero;
            SetLastError(0);

            if (IntPtr.Size == 4)
                retval = new IntPtr(SetWindowLongInternal(handle, item, newValue.ToInt32()));
            else
                retval = SetWindowLongPtrInternal(handle, item, newValue);

            if (retval == IntPtr.Zero)
            {
                int error = Marshal.GetLastWin32Error();
                if (error != 0)
                    throw new PlatformException(String.Format("Failed to modify window border. Error: {0}", error));
            }

            return retval;
        }
Exemplo n.º 24
0
 static extern int SetWindowLong(IntPtr hWnd, GetWindowLongOffsets nIndex, int dwNewLong);
Exemplo n.º 25
0
 static extern LONG_PTR SetWindowLongPtrInternal(HWND hWnd, GetWindowLongOffsets nIndex, LONG_PTR dwNewLong);
Exemplo n.º 26
0
 static extern IntPtr SetWindowLongPtr(IntPtr hWnd, GetWindowLongOffsets nIndex, IntPtr dwNewLong);
Exemplo n.º 27
0
        internal static UIntPtr GetWindowLong(IntPtr handle, GetWindowLongOffsets index)
        {
            if (IntPtr.Size == 4)
                return (UIntPtr)GetWindowLongInternal(handle, index);

            return GetWindowLongPtrInternal(handle, index);
        }
Exemplo n.º 28
0
 internal static UIntPtr GetWindowLong(IntPtr handle, GetWindowLongOffsets index)
 {
     if (IntPtr.Size == 4)
     return (UIntPtr) Functions.GetWindowLongInternal(handle, index);
       else
     return Functions.GetWindowLongPtrInternal(handle, index);
 }
Exemplo n.º 29
0
 static extern UIntPtr GetWindowLongPtrInternal(HWND hWnd, GetWindowLongOffsets nIndex);
Exemplo n.º 30
0
 internal static extern long SetWindowLong(IntPtr hWnd, GetWindowLongOffsets nIndex, long dwNewLong);