600 references to NativeMethods
WindowsBase (600)
Base\System\Windows\Input\KeyInterop.cs (341)
22case NativeMethods.VK_CANCEL: 26case NativeMethods.VK_BACK: 30case NativeMethods.VK_TAB: 34case NativeMethods.VK_CLEAR: 38case NativeMethods.VK_RETURN: 42case NativeMethods.VK_PAUSE: 46case NativeMethods.VK_CAPITAL: 50case NativeMethods.VK_KANA: 54case NativeMethods.VK_JUNJA: 58case NativeMethods.VK_FINAL: 62case NativeMethods.VK_KANJI: 66case NativeMethods.VK_ESCAPE: 70case NativeMethods.VK_CONVERT: 74case NativeMethods.VK_NONCONVERT: 78case NativeMethods.VK_ACCEPT: 82case NativeMethods.VK_MODECHANGE: 86case NativeMethods.VK_SPACE: 90case NativeMethods.VK_PRIOR: 94case NativeMethods.VK_NEXT: 98case NativeMethods.VK_END: 102case NativeMethods.VK_HOME: 106case NativeMethods.VK_LEFT: 110case NativeMethods.VK_UP: 114case NativeMethods.VK_RIGHT: 118case NativeMethods.VK_DOWN: 122case NativeMethods.VK_SELECT: 126case NativeMethods.VK_PRINT: 130case NativeMethods.VK_EXECUTE: 134case NativeMethods.VK_SNAPSHOT: 138case NativeMethods.VK_INSERT: 142case NativeMethods.VK_DELETE: 146case NativeMethods.VK_HELP: 150case NativeMethods.VK_0: 154case NativeMethods.VK_1: 158case NativeMethods.VK_2: 162case NativeMethods.VK_3: 166case NativeMethods.VK_4: 170case NativeMethods.VK_5: 174case NativeMethods.VK_6: 178case NativeMethods.VK_7: 182case NativeMethods.VK_8: 186case NativeMethods.VK_9: 190case NativeMethods.VK_A: 194case NativeMethods.VK_B: 198case NativeMethods.VK_C: 202case NativeMethods.VK_D: 206case NativeMethods.VK_E: 210case NativeMethods.VK_F: 214case NativeMethods.VK_G: 218case NativeMethods.VK_H: 222case NativeMethods.VK_I: 226case NativeMethods.VK_J: 230case NativeMethods.VK_K: 234case NativeMethods.VK_L: 238case NativeMethods.VK_M: 242case NativeMethods.VK_N: 246case NativeMethods.VK_O: 250case NativeMethods.VK_P: 254case NativeMethods.VK_Q: 258case NativeMethods.VK_R: 262case NativeMethods.VK_S: 266case NativeMethods.VK_T: 270case NativeMethods.VK_U: 274case NativeMethods.VK_V: 278case NativeMethods.VK_W: 282case NativeMethods.VK_X: 286case NativeMethods.VK_Y: 290case NativeMethods.VK_Z: 294case NativeMethods.VK_LWIN: 298case NativeMethods.VK_RWIN: 302case NativeMethods.VK_APPS: 306case NativeMethods.VK_SLEEP: 310case NativeMethods.VK_NUMPAD0: 314case NativeMethods.VK_NUMPAD1: 318case NativeMethods.VK_NUMPAD2: 322case NativeMethods.VK_NUMPAD3: 326case NativeMethods.VK_NUMPAD4: 330case NativeMethods.VK_NUMPAD5: 334case NativeMethods.VK_NUMPAD6: 338case NativeMethods.VK_NUMPAD7: 342case NativeMethods.VK_NUMPAD8: 346case NativeMethods.VK_NUMPAD9: 350case NativeMethods.VK_MULTIPLY: 354case NativeMethods.VK_ADD: 358case NativeMethods.VK_SEPARATOR: 362case NativeMethods.VK_SUBTRACT: 366case NativeMethods.VK_DECIMAL: 370case NativeMethods.VK_DIVIDE: 374case NativeMethods.VK_F1: 378case NativeMethods.VK_F2: 382case NativeMethods.VK_F3: 386case NativeMethods.VK_F4: 390case NativeMethods.VK_F5: 394case NativeMethods.VK_F6: 398case NativeMethods.VK_F7: 402case NativeMethods.VK_F8: 406case NativeMethods.VK_F9: 410case NativeMethods.VK_F10: 414case NativeMethods.VK_F11: 418case NativeMethods.VK_F12: 422case NativeMethods.VK_F13: 426case NativeMethods.VK_F14: 430case NativeMethods.VK_F15: 434case NativeMethods.VK_F16: 438case NativeMethods.VK_F17: 442case NativeMethods.VK_F18: 446case NativeMethods.VK_F19: 450case NativeMethods.VK_F20: 454case NativeMethods.VK_F21: 458case NativeMethods.VK_F22: 462case NativeMethods.VK_F23: 466case NativeMethods.VK_F24: 470case NativeMethods.VK_NUMLOCK: 474case NativeMethods.VK_SCROLL: 478case NativeMethods.VK_SHIFT: 479case NativeMethods.VK_LSHIFT: 483case NativeMethods.VK_RSHIFT: 487case NativeMethods.VK_CONTROL: 488case NativeMethods.VK_LCONTROL: 492case NativeMethods.VK_RCONTROL: 496case NativeMethods.VK_MENU: 497case NativeMethods.VK_LMENU: 501case NativeMethods.VK_RMENU: 505case NativeMethods.VK_BROWSER_BACK: 509case NativeMethods.VK_BROWSER_FORWARD: 513case NativeMethods.VK_BROWSER_REFRESH: 517case NativeMethods.VK_BROWSER_STOP: 521case NativeMethods.VK_BROWSER_SEARCH: 525case NativeMethods.VK_BROWSER_FAVORITES: 529case NativeMethods.VK_BROWSER_HOME: 533case NativeMethods.VK_VOLUME_MUTE: 537case NativeMethods.VK_VOLUME_DOWN: 541case NativeMethods.VK_VOLUME_UP: 545case NativeMethods.VK_MEDIA_NEXT_TRACK: 549case NativeMethods.VK_MEDIA_PREV_TRACK: 553case NativeMethods.VK_MEDIA_STOP: 557case NativeMethods.VK_MEDIA_PLAY_PAUSE: 561case NativeMethods.VK_LAUNCH_MAIL: 565case NativeMethods.VK_LAUNCH_MEDIA_SELECT: 569case NativeMethods.VK_LAUNCH_APP1: 573case NativeMethods.VK_LAUNCH_APP2: 577case NativeMethods.VK_OEM_1: 581case NativeMethods.VK_OEM_PLUS: 585case NativeMethods.VK_OEM_COMMA: 589case NativeMethods.VK_OEM_MINUS: 593case NativeMethods.VK_OEM_PERIOD: 597case NativeMethods.VK_OEM_2: 601case NativeMethods.VK_OEM_3: 605case NativeMethods.VK_C1: 609case NativeMethods.VK_C2: 613case NativeMethods.VK_OEM_4: 617case NativeMethods.VK_OEM_5: 621case NativeMethods.VK_OEM_6: 625case NativeMethods.VK_OEM_7: 629case NativeMethods.VK_OEM_8: 633case NativeMethods.VK_OEM_102: 637case NativeMethods.VK_PROCESSKEY: 641case NativeMethods.VK_OEM_ATTN: // VK_DBE_ALPHANUMERIC 645case NativeMethods.VK_OEM_FINISH: // VK_DBE_KATAKANA 649case NativeMethods.VK_OEM_COPY: // VK_DBE_HIRAGANA 653case NativeMethods.VK_OEM_AUTO: // VK_DBE_SBCSCHAR 657case NativeMethods.VK_OEM_ENLW: // VK_DBE_DBCSCHAR 661case NativeMethods.VK_OEM_BACKTAB: // VK_DBE_ROMAN 665case NativeMethods.VK_ATTN: // VK_DBE_NOROMAN 669case NativeMethods.VK_CRSEL: // VK_DBE_ENTERWORDREGISTERMODE 673case NativeMethods.VK_EXSEL: // VK_DBE_ENTERIMECONFIGMODE 677case NativeMethods.VK_EREOF: // VK_DBE_FLUSHSTRING 681case NativeMethods.VK_PLAY: // VK_DBE_CODEINPUT 685case NativeMethods.VK_ZOOM: // VK_DBE_NOCODEINPUT 689case NativeMethods.VK_NONAME: // VK_DBE_DETERMINESTRING 693case NativeMethods.VK_PA1: // VK_DBE_ENTERDLGCONVERSIONMODE 697case NativeMethods.VK_OEM_CLEAR: 719virtualKey = NativeMethods.VK_CANCEL; 723virtualKey = NativeMethods.VK_BACK; 727virtualKey = NativeMethods.VK_TAB; 731virtualKey = NativeMethods.VK_CLEAR; 735virtualKey = NativeMethods.VK_RETURN; 739virtualKey = NativeMethods.VK_PAUSE; 743virtualKey = NativeMethods.VK_CAPITAL; 747virtualKey = NativeMethods.VK_KANA; 751virtualKey = NativeMethods.VK_JUNJA; 755virtualKey = NativeMethods.VK_FINAL; 759virtualKey = NativeMethods.VK_KANJI; 763virtualKey = NativeMethods.VK_ESCAPE; 767virtualKey = NativeMethods.VK_CONVERT; 771virtualKey = NativeMethods.VK_NONCONVERT; 775virtualKey = NativeMethods.VK_ACCEPT; 779virtualKey = NativeMethods.VK_MODECHANGE; 783virtualKey = NativeMethods.VK_SPACE; 787virtualKey = NativeMethods.VK_PRIOR; 791virtualKey = NativeMethods.VK_NEXT; 795virtualKey = NativeMethods.VK_END; 799virtualKey = NativeMethods.VK_HOME; 803virtualKey = NativeMethods.VK_LEFT; 807virtualKey = NativeMethods.VK_UP; 811virtualKey = NativeMethods.VK_RIGHT; 815virtualKey = NativeMethods.VK_DOWN; 819virtualKey = NativeMethods.VK_SELECT; 823virtualKey = NativeMethods.VK_PRINT; 827virtualKey = NativeMethods.VK_EXECUTE; 831virtualKey = NativeMethods.VK_SNAPSHOT; 835virtualKey = NativeMethods.VK_INSERT; 839virtualKey = NativeMethods.VK_DELETE; 843virtualKey = NativeMethods.VK_HELP; 847virtualKey = NativeMethods.VK_0; 851virtualKey = NativeMethods.VK_1; 855virtualKey = NativeMethods.VK_2; 859virtualKey = NativeMethods.VK_3; 863virtualKey = NativeMethods.VK_4; 867virtualKey = NativeMethods.VK_5; 871virtualKey = NativeMethods.VK_6; 875virtualKey = NativeMethods.VK_7; 879virtualKey = NativeMethods.VK_8; 883virtualKey = NativeMethods.VK_9; 887virtualKey = NativeMethods.VK_A; 891virtualKey = NativeMethods.VK_B; 895virtualKey = NativeMethods.VK_C; 899virtualKey = NativeMethods.VK_D; 903virtualKey = NativeMethods.VK_E; 907virtualKey = NativeMethods.VK_F; 911virtualKey = NativeMethods.VK_G; 915virtualKey = NativeMethods.VK_H; 919virtualKey = NativeMethods.VK_I; 923virtualKey = NativeMethods.VK_J; 927virtualKey = NativeMethods.VK_K; 931virtualKey = NativeMethods.VK_L; 935virtualKey = NativeMethods.VK_M; 939virtualKey = NativeMethods.VK_N; 943virtualKey = NativeMethods.VK_O; 947virtualKey = NativeMethods.VK_P; 951virtualKey = NativeMethods.VK_Q; 955virtualKey = NativeMethods.VK_R; 959virtualKey = NativeMethods.VK_S; 963virtualKey = NativeMethods.VK_T; 967virtualKey = NativeMethods.VK_U; 971virtualKey = NativeMethods.VK_V; 975virtualKey = NativeMethods.VK_W; 979virtualKey = NativeMethods.VK_X; 983virtualKey = NativeMethods.VK_Y; 987virtualKey = NativeMethods.VK_Z; 991virtualKey = NativeMethods.VK_LWIN; 995virtualKey = NativeMethods.VK_RWIN; 999virtualKey = NativeMethods.VK_APPS; 1003virtualKey = NativeMethods.VK_SLEEP; 1007virtualKey = NativeMethods.VK_NUMPAD0; 1011virtualKey = NativeMethods.VK_NUMPAD1; 1015virtualKey = NativeMethods.VK_NUMPAD2; 1019virtualKey = NativeMethods.VK_NUMPAD3; 1023virtualKey = NativeMethods.VK_NUMPAD4; 1027virtualKey = NativeMethods.VK_NUMPAD5; 1031virtualKey = NativeMethods.VK_NUMPAD6; 1035virtualKey = NativeMethods.VK_NUMPAD7; 1039virtualKey = NativeMethods.VK_NUMPAD8; 1043virtualKey = NativeMethods.VK_NUMPAD9; 1047virtualKey = NativeMethods.VK_MULTIPLY; 1051virtualKey = NativeMethods.VK_ADD; 1055virtualKey = NativeMethods.VK_SEPARATOR; 1059virtualKey = NativeMethods.VK_SUBTRACT; 1063virtualKey = NativeMethods.VK_DECIMAL; 1067virtualKey = NativeMethods.VK_DIVIDE; 1071virtualKey = NativeMethods.VK_F1; 1075virtualKey = NativeMethods.VK_F2; 1079virtualKey = NativeMethods.VK_F3; 1083virtualKey = NativeMethods.VK_F4; 1087virtualKey = NativeMethods.VK_F5; 1091virtualKey = NativeMethods.VK_F6; 1095virtualKey = NativeMethods.VK_F7; 1099virtualKey = NativeMethods.VK_F8; 1103virtualKey = NativeMethods.VK_F9; 1107virtualKey = NativeMethods.VK_F10; 1111virtualKey = NativeMethods.VK_F11; 1115virtualKey = NativeMethods.VK_F12; 1119virtualKey = NativeMethods.VK_F13; 1123virtualKey = NativeMethods.VK_F14; 1127virtualKey = NativeMethods.VK_F15; 1131virtualKey = NativeMethods.VK_F16; 1135virtualKey = NativeMethods.VK_F17; 1139virtualKey = NativeMethods.VK_F18; 1143virtualKey = NativeMethods.VK_F19; 1147virtualKey = NativeMethods.VK_F20; 1151virtualKey = NativeMethods.VK_F21; 1155virtualKey = NativeMethods.VK_F22; 1159virtualKey = NativeMethods.VK_F23; 1163virtualKey = NativeMethods.VK_F24; 1167virtualKey = NativeMethods.VK_NUMLOCK; 1171virtualKey = NativeMethods.VK_SCROLL; 1175virtualKey = NativeMethods.VK_LSHIFT; 1179virtualKey = NativeMethods.VK_RSHIFT; 1183virtualKey = NativeMethods.VK_LCONTROL; 1187virtualKey = NativeMethods.VK_RCONTROL; 1191virtualKey = NativeMethods.VK_LMENU; 1195virtualKey = NativeMethods.VK_RMENU; 1199virtualKey = NativeMethods.VK_BROWSER_BACK; 1203virtualKey = NativeMethods.VK_BROWSER_FORWARD; 1207virtualKey = NativeMethods.VK_BROWSER_REFRESH; 1211virtualKey = NativeMethods.VK_BROWSER_STOP; 1215virtualKey = NativeMethods.VK_BROWSER_SEARCH; 1219virtualKey = NativeMethods.VK_BROWSER_FAVORITES; 1223virtualKey = NativeMethods.VK_BROWSER_HOME; 1227virtualKey = NativeMethods.VK_VOLUME_MUTE; 1231virtualKey = NativeMethods.VK_VOLUME_DOWN; 1235virtualKey = NativeMethods.VK_VOLUME_UP; 1239virtualKey = NativeMethods.VK_MEDIA_NEXT_TRACK; 1243virtualKey = NativeMethods.VK_MEDIA_PREV_TRACK; 1247virtualKey = NativeMethods.VK_MEDIA_STOP; 1251virtualKey = NativeMethods.VK_MEDIA_PLAY_PAUSE; 1255virtualKey = NativeMethods.VK_LAUNCH_MAIL; 1259virtualKey = NativeMethods.VK_LAUNCH_MEDIA_SELECT; 1263virtualKey = NativeMethods.VK_LAUNCH_APP1; 1267virtualKey = NativeMethods.VK_LAUNCH_APP2; 1271virtualKey = NativeMethods.VK_OEM_1; 1275virtualKey = NativeMethods.VK_OEM_PLUS; 1279virtualKey = NativeMethods.VK_OEM_COMMA; 1283virtualKey = NativeMethods.VK_OEM_MINUS; 1287virtualKey = NativeMethods.VK_OEM_PERIOD; 1291virtualKey = NativeMethods.VK_OEM_2; 1295virtualKey = NativeMethods.VK_OEM_3; 1299virtualKey = NativeMethods.VK_C1; 1303virtualKey = NativeMethods.VK_C2; 1307virtualKey = NativeMethods.VK_OEM_4; 1311virtualKey = NativeMethods.VK_OEM_5; 1315virtualKey = NativeMethods.VK_OEM_6; 1319virtualKey = NativeMethods.VK_OEM_7; 1323virtualKey = NativeMethods.VK_OEM_8; 1327virtualKey = NativeMethods.VK_OEM_102; 1331virtualKey = NativeMethods.VK_PROCESSKEY; 1335virtualKey = NativeMethods.VK_OEM_ATTN; // VK_DBE_ALPHANUMERIC 1339virtualKey = NativeMethods.VK_OEM_FINISH; // VK_DBE_KATAKANA 1343virtualKey = NativeMethods.VK_OEM_COPY; // VK_DBE_HIRAGANA 1347virtualKey = NativeMethods.VK_OEM_AUTO; // VK_DBE_SBCSCHAR 1351virtualKey = NativeMethods.VK_OEM_ENLW; // VK_DBE_DBCSCHAR 1355virtualKey = NativeMethods.VK_OEM_BACKTAB; // VK_DBE_ROMAN 1359virtualKey = NativeMethods.VK_ATTN; // VK_DBE_NOROMAN 1363virtualKey = NativeMethods.VK_CRSEL; // VK_DBE_ENTERWORDREGISTERMODE 1367virtualKey = NativeMethods.VK_EXSEL; // VK_DBE_ENTERIMECONFIGMODE 1371virtualKey = NativeMethods.VK_EREOF; // VK_DBE_FLUSHSTRING 1375virtualKey = NativeMethods.VK_PLAY; // VK_DBE_CODEINPUT 1379virtualKey = NativeMethods.VK_ZOOM; // VK_DBE_NOCODEINPUT 1383virtualKey = NativeMethods.VK_NONAME; // VK_DBE_DETERMINESTRING 1387virtualKey = NativeMethods.VK_PA1; // VK_ENTERDLGCONVERSIONMODE 1391virtualKey = NativeMethods.VK_OEM_CLEAR;
Base\System\Windows\SplashScreen.cs (27)
42private NativeMethods.BitmapHandle _hBitmap; 47NativeMethods.BLENDFUNCTION _blendFunc; 51private static NativeMethods.WndProc _defWndProc; 174private IntPtr CreateWindow(NativeMethods.BitmapHandle hBitmap, int width, int height, bool topMost) 178_defWndProc = new MS.Win32.NativeMethods.WndProc(UnsafeNativeMethods.DefWindowProc); 181MS.Win32.NativeMethods.WNDCLASSEX_D wndClass = new MS.Win32.NativeMethods.WNDCLASSEX_D(); 182wndClass.cbSize = Marshal.SizeOf(typeof(MS.Win32.NativeMethods.WNDCLASSEX_D)); 207(int) NativeMethods.WS_EX_WINDOWEDGE | 208NativeMethods.WS_EX_TOOLWINDOW | 209NativeMethods.WS_EX_LAYERED | 210(topMost ? NativeMethods.WS_EX_TOPMOST : 0); 216MS.Win32.NativeMethods.WS_POPUP | MS.Win32.NativeMethods.WS_VISIBLE, 225NativeMethods.POINT newSize = new NativeMethods.POINT(width, height); 226NativeMethods.POINT newLocation = new NativeMethods.POINT(x, y); 227NativeMethods.POINT sourceLocation = new NativeMethods.POINT(0, 0); 228_blendFunc = new NativeMethods.BLENDFUNCTION(); 229_blendFunc.BlendOp = NativeMethods.AC_SRC_OVER; 235memDC, sourceLocation, 0, ref _blendFunc, NativeMethods.ULW_ALPHA); 341UnsafeNativeMethods.UpdateLayeredWindow(_hwnd, IntPtr.Zero, null, null, IntPtr.Zero, null, 0, ref _blendFunc, NativeMethods.ULW_ALPHA); 450MS.Win32.NativeMethods.BITMAPINFO bmInfo = new MS.Win32.NativeMethods.BITMAPINFO(width, height, 32 /*bpp*/); 451bmInfo.bmiHeader_biCompression = MS.Win32.NativeMethods.BI_RGB;
Base\System\Windows\Threading\Dispatcher.cs (5)
2599NativeMethods.QS_INPUT | 2600NativeMethods.QS_EVENT | 2601NativeMethods.QS_POSTMESSAGE, 2602NativeMethods.MWMO_INPUTAVAILABLE); 2649UnsafeNativeMethods.PeekMessage(ref msg, new HandleRef(this, _window.Value.Handle), _msgProcessQueue, _msgProcessQueue, NativeMethods.PM_REMOVE);
Shared\MS\Internal\TextServicesLoader.cs (1)
120if (UnsafeNativeMethods.TF_CreateThreadMgr(out threadManager) == NativeMethods.S_OK)
Shared\MS\Win32\HwndSubclass.cs (11)
346HookWindowProc(hwnd, new NativeMethods.WndProc(SubclassWndProc), 468NativeMethods.WndProc newWndProc = new NativeMethods.WndProc(SubclassWndProc); 469IntPtr oldWndProc = UnsafeNativeMethods.GetWindowLongPtr(new HandleRef(this,hwnd), NativeMethods.GWL_WNDPROC); 536private void HookWindowProc(IntPtr hwnd, NativeMethods.WndProc newWndProc, IntPtr oldWndProc) 544IntPtr oldWndProc2 = (IntPtr)UnsafeNativeMethods.CriticalSetWindowLong(_hwndHandleRef, NativeMethods.GWL_WNDPROC, _attachedWndProc); 592NativeMethods.WndProc currentWndProc = UnsafeNativeMethods.GetWindowLongWndProc(new HandleRef(this,_hwndAttached)); 609UnsafeNativeMethods.CriticalSetWindowLong(_hwndHandleRef, NativeMethods.GWL_WNDPROC, _oldWndProc); 705private static NativeMethods.WndProc DefWndProcStub = new NativeMethods.WndProc(DefWndProcWrapper); 727private NativeMethods.WndProc _attachedWndProc;
Shared\MS\Win32\HwndWrapper.cs (6)
92NativeMethods.WNDCLASSEX_D wc_d = new NativeMethods.WNDCLASSEX_D(); 94IntPtr hNullBrush = UnsafeNativeMethods.CriticalGetStockObject(NativeMethods.NULL_BRUSH); 107NativeMethods.WndProc initialWndProc = new NativeMethods.WndProc(hwndSubclass.SubclassWndProc); 129wc_d.cbSize = Marshal.SizeOf(typeof(NativeMethods.WNDCLASSEX_D));
Shared\MS\Win32\ManagedWndProcTracker.cs (3)
108int windowStyle = UnsafeNativeMethods.GetWindowLong(new HandleRef(null,hwnd), NativeMethods.GWL_STYLE); 109if((windowStyle & NativeMethods.WS_CHILD) != 0) 174result = UnsafeNativeMethods.SetWindowLong(new HandleRef(null,hwnd), NativeMethods.GWL_WNDPROC, defWindowProc);
Shared\MS\Win32\MessageOnlyHwndWrapper.cs (1)
17public MessageOnlyHwndWrapper() : base(0, 0, 0, 0, 0, 0, 0, "", NativeMethods.HWND_MESSAGE, null)
Shared\MS\Win32\NativeMethodsCLR.cs (2)
3911public int nMaxFile = NativeMethods.MAX_PATH; 3913public int nMaxFileTitle = NativeMethods.MAX_PATH;
Shared\MS\Win32\NativeMethodsOther.cs (3)
298private BitmapHandle(bool ownsHandle) : base(ownsHandle, NativeMethods.CommonHandles.GDI) 339private IconHandle() : base(true, NativeMethods.CommonHandles.Icon) 382private CursorHandle() : base(true, NativeMethods.CommonHandles.Cursor)
Shared\MS\Win32\NativeMethodsSetLastError.cs (5)
138public static extern NativeMethods.WndProc GetWindowLongWndProc(HandleRef hWnd, int nIndex); 147public static extern NativeMethods.WndProc GetWindowLongPtrWndProc(HandleRef hWnd, int nIndex); 156public static extern int MapWindowPoints(HandleRef hWndFrom, HandleRef hWndTo, [In, Out] ref NativeMethods.RECT rect, int cPoints); 168public static extern Int32 SetWindowLongWndProc(HandleRef hWnd, int nIndex, NativeMethods.WndProc dwNewLong); 177public static extern IntPtr SetWindowLongPtrWndProc(HandleRef hWnd, int nIndex, NativeMethods.WndProc dwNewLong);
Shared\MS\Win32\SafeNativeMethodsCLR.cs (53)
104internal static void GetMonitorInfo(HandleRef hmonitor, [In, Out]NativeMethods.MONITORINFOEX info) 118public static IntPtr MonitorFromPoint(NativeMethods.POINTSTRUCT pt, int flags) 129public static IntPtr MonitorFromRect(ref NativeMethods.RECT rect, int flags) 152public static NativeMethods.CursorHandle LoadCursor(HandleRef hInst, IntPtr iconId) 154NativeMethods.CursorHandle cursorHandle = SafeNativeMethodsPrivate.LoadCursor(hInst, iconId); 190internal static bool AdjustWindowRectEx(ref NativeMethods.RECT lpRect, int dwStyle, bool bMenu, int dwExStyle) 206internal static void GetClientRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect) 217internal static NativeMethods.RECT GetClientRect(HandleRef hWnd) 219var clientRect = default(NativeMethods.RECT); 229internal static void GetWindowRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect) 290public static bool TrackMouseEvent(NativeMethods.TRACKMOUSEEVENT tme) 411public static void ScreenToClient(HandleRef hWnd, [In, Out] NativeMethods.POINT pt) 530int sessionId = SessionId.HasValue ? SessionId.Value : NativeMethods.WTS_CURRENT_SESSION; 536NativeMethods.WTS_CURRENT_SERVER_HANDLE, 538NativeMethods.WTS_INFO_CLASS.WTSConnectState, 542if (Enum.IsDefined(typeof(NativeMethods.WTS_CONNECTSTATE_CLASS), data)) 544var connectState = (NativeMethods.WTS_CONNECTSTATE_CLASS)data; 545currentSessionConnectState = (connectState == NativeMethods.WTS_CONNECTSTATE_CLASS.WTSActive); 577/// <returns>The <see cref="NativeMethods.PROCESS_DPI_AWARENESS"/> of the specified process</returns> 593internal static NativeMethods.PROCESS_DPI_AWARENESS GetProcessDpiAwareness(HandleRef hProcess) 598if(hr != NativeMethods.S_OK) 603return (NativeMethods.PROCESS_DPI_AWARENESS)NativeMethods.IntPtrToInt32(ptrProcessDpiAwareness); 668/// <returns>The DPI for the window which depends on the <see cref="NativeMethods.DPI_AWARENESS"/> of the window. An invalid <paramref name="hwnd"/> value will result in a return value of 0.</returns> 670/// The following table indicates the return value of GetDpiForWindow based on the <see cref="NativeMethods.DPI_AWARENESS"/> of the provided <paramref name="hwnd"/>. 698/// DPI_AWARENESS (see <see cref="NativeMethods.DPI_AWARENESS"/>) value of DPI_AWARENESS_UNAWARE(<see cref="NativeMethods.DPI_AWARENESS.DPI_AWARENESS_UNAWARE"/>), 737internal static NativeMethods.DPI_HOSTING_BEHAVIOR GetWindowDpiHostingBehavior(IntPtr hWnd) 757internal static NativeMethods.DPI_HOSTING_BEHAVIOR GetThreadDpiHostingBehavior() 793ref NativeMethods.RECT lpRect, 830ref NativeMethods.POINT lpPoint) 856ref NativeMethods.POINT lpPoint) 888public static extern bool IntGetWindowRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect); 891public static extern bool IntGetClientRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect); 894public static extern bool IntAdjustWindowRectEx(ref NativeMethods.RECT lpRect, int dwStyle, bool bMenu, int dwExStyle); 897public static extern IntPtr MonitorFromRect(ref NativeMethods.RECT rect, int flags); 900public static extern IntPtr MonitorFromPoint(NativeMethods.POINTSTRUCT pt, int flags); 909public static extern IntPtr SetTimer(HandleRef hWnd, int nIDEvent, int uElapse, NativeMethods.TimerProc lpTimerFunc); 912public static extern IntPtr TrySetTimer(HandleRef hWnd, int nIDEvent, int uElapse, NativeMethods.TimerProc lpTimerFunc); 933public static extern bool IntGetMonitorInfo(HandleRef hmonitor, [In, Out]NativeMethods.MONITORINFOEX info); 952public static extern bool TrackMouseEvent(NativeMethods.TRACKMOUSEEVENT tme); 955public static extern NativeMethods.CursorHandle LoadCursor(HandleRef hInst, IntPtr iconId); 966public static extern int IntScreenToClient(HandleRef hWnd, [In, Out] NativeMethods.POINT pt); 977[In]NativeMethods.WTS_INFO_CLASS WTSInfoClass, 1051[In] [Out] ref NativeMethods.RECT lpRect, 1079[In] [Out] ref NativeMethods.POINT lpPoint); 1104[In] [Out] ref NativeMethods.POINT lpPoint); 1155/// <returns>The DPI for the window which depends on the <see cref="NativeMethods.DPI_AWARENESS"/> of the window. An invalid <paramref name="hwnd"/> value will result in a return value of 0.</returns> 1157/// The following table indicates the return value of GetDpiForWindow based on the <see cref="NativeMethods.DPI_AWARENESS"/> of the provided <paramref name="hwnd"/>. 1179/// DPI_AWARENESS (see <see cref="NativeMethods.DPI_AWARENESS"/>) value of DPI_AWARENESS_UNAWARE(<see cref="NativeMethods.DPI_AWARENESS.DPI_AWARENESS_UNAWARE"/>), 1211internal static extern NativeMethods.DPI_HOSTING_BEHAVIOR GetWindowDpiHostingBehavior(IntPtr hWnd); 1226internal static extern NativeMethods.DPI_HOSTING_BEHAVIOR GetThreadDpiHostingBehavior();
Shared\MS\Win32\SafeNativeMethodsOther.cs (2)
287int nIndex = exStyle ? NativeMethods.GWL_EXSTYLE : NativeMethods.GWL_STYLE;
Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (101)
169public static extern uint GetDpiForMonitor(HandleRef hMonitor, NativeMethods.MONITOR_DPI_TYPE dpiType, out uint dpiX, out uint dpiY); 236public static extern int CriticalFillRect(IntPtr hdc, ref NativeMethods.RECT rcFill, IntPtr brush); 258HandleCollector.Remove((IntPtr)hObject, NativeMethods.CommonHandles.GDI); 272HandleCollector.Remove((IntPtr)hObject, NativeMethods.CommonHandles.GDI); 302public static extern IntPtr SelectObject(HandleRef hdc, NativeMethods.BitmapHandle obj); 577public extern static bool EnumThreadWindows(int dwThreadId, NativeMethods.EnumThreadWindowsCallback lpfn, HandleRef lParam); 595HandleCollector.Remove((IntPtr)handle, NativeMethods.CommonHandles.Kernel); 643return HandleCollector.Add(h, NativeMethods.CommonHandles.HDC); 671HandleCollector.Remove((IntPtr)pvBaseAddress, NativeMethods.CommonHandles.Kernel); 717public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] NativeMethods.BITMAP bm); 732private static extern bool IntGetCursorPos([In, Out] NativeMethods.POINT pt); 738internal static bool GetCursorPos([In, Out] NativeMethods.POINT pt) 753private static extern bool IntTryGetCursorPos([In, Out] NativeMethods.POINT pt); 759internal static bool TryGetCursorPos([In, Out] NativeMethods.POINT pt) 1024public static extern int ImmConfigureIME(HandleRef hkl, HandleRef hwnd, int dwData, [In] ref NativeMethods.REGISTERWORD registerWord); 1032public static extern int ImmSetCompositionWindow(HandleRef hIMC, [In, Out] ref NativeMethods.COMPOSITIONFORM compform); 1040public static extern int ImmSetCandidateWindow(HandleRef hIMC, [In, Out] ref NativeMethods.CANDIDATEFORM candform); 1450public static extern bool SystemParametersInfo(int nAction, int nParam, ref NativeMethods.RECT rc, int nUpdate); 1474public static extern bool SystemParametersInfo(int nAction, int nParam, ref NativeMethods.HIGHCONTRAST_I rc, int nUpdate); 1482public static extern bool SystemParametersInfo(int nAction, int nParam, [In, Out] NativeMethods.NONCLIENTMETRICS metrics, int nUpdate); 1489public static extern bool GetSystemPowerStatus(ref NativeMethods.SYSTEM_POWER_STATUS systemPowerStatus); 1497private static extern int IntClientToScreen(HandleRef hWnd, [In, Out] NativeMethods.POINT pt); 1503public static void ClientToScreen(HandleRef hWnd, [In, Out] NativeMethods.POINT pt) 1603private static extern IntPtr IntBeginPaint(HandleRef hWnd, [In, Out] ref NativeMethods.PAINTSTRUCT lpPaint); 1609public static IntPtr BeginPaint(HandleRef hWnd, [In, Out, MarshalAs(UnmanagedType.LPStruct)] ref NativeMethods.PAINTSTRUCT lpPaint) { 1610return HandleCollector.Add(IntBeginPaint(hWnd, ref lpPaint), NativeMethods.CommonHandles.HDC); 1619private static extern bool IntEndPaint(HandleRef hWnd, ref NativeMethods.PAINTSTRUCT lpPaint); 1625public static bool EndPaint(HandleRef hWnd, [In, MarshalAs(UnmanagedType.LPStruct)] ref NativeMethods.PAINTSTRUCT lpPaint) { 1626HandleCollector.Remove(lpPaint.hdc, NativeMethods.CommonHandles.HDC); 1652return HandleCollector.Add(hDc, NativeMethods.CommonHandles.HDC); 1669HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.HDC); 1713internal static extern bool GetOpenFileName([In, Out] NativeMethods.OPENFILENAME_I ofn); 1721internal static extern bool GetSaveFileName([In, Out] NativeMethods.OPENFILENAME_I ofn); 1740public static extern bool UpdateLayeredWindow(IntPtr hwnd, IntPtr hdcDst, NativeMethods.POINT pptDst, NativeMethods.POINT pSizeDst, IntPtr hdcSrc, NativeMethods.POINT pptSrc, int crKey, ref NativeMethods.BLENDFUNCTION pBlend, int dwFlags); 1840private static extern NativeMethods.BitmapHandle PrivateCreateDIBSection(HandleRef hdc, ref NativeMethods.BITMAPINFO bitmapInfo, int iUsage, ref IntPtr ppvBits, SafeFileMappingHandle hSection, int dwOffset); 1845internal static NativeMethods.BitmapHandle CreateDIBSection(HandleRef hdc, ref NativeMethods.BITMAPINFO bitmapInfo, int iUsage, ref IntPtr ppvBits, SafeFileMappingHandle hSection, int dwOffset) 1853NativeMethods.BitmapHandle hBitmap = PrivateCreateDIBSection(hdc, ref bitmapInfo, iUsage, ref ppvBits, hSection, dwOffset); 1870private static extern NativeMethods.BitmapHandle PrivateCreateBitmap(int width, int height, int planes, int bitsPerPixel, byte[] lpvBits); 1875internal static NativeMethods.BitmapHandle CreateBitmap(int width, int height, int planes, int bitsPerPixel, byte[] lpvBits) 1877NativeMethods.BitmapHandle hBitmap = PrivateCreateBitmap(width, height, planes, bitsPerPixel, lpvBits); 1900HandleCollector.Remove((IntPtr)handle, NativeMethods.CommonHandles.Icon); 1918private static extern NativeMethods.IconHandle PrivateCreateIconIndirect([In, MarshalAs(UnmanagedType.LPStruct)]NativeMethods.ICONINFO iconInfo); 1923internal static NativeMethods.IconHandle CreateIconIndirect([In, MarshalAs(UnmanagedType.LPStruct)]NativeMethods.ICONINFO iconInfo) 1925NativeMethods.IconHandle hIcon = PrivateCreateIconIndirect(iconInfo); 1954HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.HDC); 1975HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.HDC); 2089internal static extern IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags); 2248NativeMethods.POINT pPtlHimetric, 2250NativeMethods.POINTF pPtfContainer, 2331NativeMethods.COMRECT lprcPosRect, 2333NativeMethods.COMRECT lprcClipRect, 2335NativeMethods.OLEINPLACEFRAMEINFO lpFrameInfo); 2339NativeMethods.SIZE scrollExtant); 2357NativeMethods.COMRECT lprcPosRect); 2448NativeMethods.COMRECT lprectBorder); 2453NativeMethods.COMRECT pborderwidths); 2458NativeMethods.COMRECT pborderwidths); 2472NativeMethods.tagOleMenuGroupWidths lpMenuWidths); 2577NativeMethods.RECT lprectBorder); 2582NativeMethods.RECT pborderwidths); 2587NativeMethods.RECT pborderwidths); 2632NativeMethods.RECT prcBorder, 2685NativeMethods.COMRECT lprcPosRect, 2687NativeMethods.COMRECT lprcClipRect); 2767NativeMethods.COMRECT lprcPosRect); 2795NativeMethods.SIZE pSizel); 2802NativeMethods.SIZE pSizel); 2826NativeMethods.tagLOGPALETTE pLogpal); 2901NativeMethods.RECT lprcPosRect); 2929NativeMethods.SIZE pSizel); 2936NativeMethods.SIZE pSizel); 2961NativeMethods.tagLOGPALETTE pLogpal); 2989NativeMethods.tagCONTROLINFO pCI); 3093NativeMethods.tagOLEVERB rgelt, 3185NativeMethods.STATSTG pStatstg, 3282NativeMethods.DISPPARAMS pDispParams, 3286NativeMethods.EXCEPINFO pExcepInfo, 3345NativeMethods.DISPPARAMS pDispParams, 3349NativeMethods.EXCEPINFO pExcepInfo, 3374[In, Out] NativeMethods.DISPPARAMS dispParams, 3382[In, Out] NativeMethods.EXCEPINFO exceptionInfo, 3588NativeMethods.WebBrowserReadyState ReadyState { get;} 3706NativeMethods.POINT pt, 3716NativeMethods.DOCHOSTUIINFO info); 3726NativeMethods.IOleCommandTarget commandTarget, 3762NativeMethods.COMRECT rect, 4081int hr = NativeMethods.S_OK; 4086int hrcurrent = NativeMethods.S_OK; 4093if (NativeMethods.Succeeded(hr) && NativeMethods.Failed(hrcurrent)) 4100if (NativeMethods.Failed(hr)) 4210[In, Out] NativeMethods.RAWINPUTDEVICELIST[] ridl, 4222[In] ref NativeMethods.RID_DEVICE_INFO ridInfo, 4347NativeMethods.MonitorEnumProc lpfnEnum,
Shared\MS\Win32\UnsafeNativeMethodsOther.cs (38)
77out NativeMethods.IconHandle phiconLarge, 78out NativeMethods.IconHandle phiconSmall, 86internal static extern NativeMethods.IconHandle CreateIcon(IntPtr hInstance, int nWidth, int nHeight, byte cPlanes, byte cBitsPixel, byte[] lpbANDbits, byte[] lpbXORbits); 93public static extern bool CreateCaret(HandleRef hwnd, NativeMethods.BitmapHandle hbitmap, int width, int height); 117internal static extern NativeMethods.IconHandle LoadImageIcon(IntPtr hinst, string stName, int nType, int cxDesired, int cyDesired, int nFlags); 120internal static extern NativeMethods.CursorHandle LoadImageCursor(IntPtr hinst, string stName, int nType, int cxDesired, int cyDesired, int nFlags); 180internal static extern bool GetVersionEx([In, Out] NativeMethods.OSVERSIONINFOEX ver); 202void SetSecuritySite( NativeMethods.IInternetSecurityMgrSite pSite); 264[In] NativeMethods.SECURITY_ATTRIBUTES lpSecurityAttributes, 340internal static extern UInt16 IntRegisterClassEx(NativeMethods.WNDCLASSEX_D wc_d); 346internal static UInt16 RegisterClassEx(NativeMethods.WNDCLASSEX_D wc_d) 448int length = MS.Win32.NativeMethods.MAX_PATH; 512internal static extern IntPtr SendMessage( HandleRef hWnd, WindowMessage msg, IntPtr wParam, NativeMethods.IconHandle iconHandle ); 637internal unsafe static extern SafeFileMappingHandle CreateFileMapping(SafeFileHandle hFile, NativeMethods.SECURITY_ATTRIBUTES lpFileMappingAttributes, int flProtect, uint dwMaximumSizeHigh, uint dwMaximumSizeLow, string lpName); 662Int32 tempResult = NativeMethodsSetLastError.SetWindowLong(hWnd, nIndex, NativeMethods.IntPtrToInt32(dwNewLong)); 685Int32 tempResult = NativeMethodsSetLastError.SetWindowLong(hWnd, nIndex, NativeMethods.IntPtrToInt32(dwNewLong)); 701internal static IntPtr CriticalSetWindowLong(HandleRef hWnd, int nIndex, NativeMethods.WndProc dwNewLong) 787iResult = NativeMethods.IntPtrToInt32(result); 808internal static NativeMethods.WndProc GetWindowLongWndProc(HandleRef hWnd) 810NativeMethods.WndProc returnValue = null; 816returnValue = NativeMethodsSetLastError.GetWindowLongWndProc(hWnd, NativeMethods.GWL_WNDPROC); 822returnValue = NativeMethodsSetLastError.GetWindowLongPtrWndProc(hWnd, NativeMethods.GWL_WNDPROC); 949internal static void GetIconInfo(HandleRef hIcon, out NativeMethods.ICONINFO piconinfo) 953piconinfo = new NativeMethods.ICONINFO(); 969piconinfo.hbmMask = NativeMethods.BitmapHandle.CreateFromHandle(iconInfoImpl.hbmMask); 970piconinfo.hbmColor = NativeMethods.BitmapHandle.CreateFromHandle(iconInfoImpl.hbmColor); 997private static extern bool IntGetWindowPlacement(HandleRef hWnd, ref NativeMethods.WINDOWPLACEMENT placement); 1006internal static void GetWindowPlacement(HandleRef hWnd, ref NativeMethods.WINDOWPLACEMENT placement) 1016private static extern bool IntSetWindowPlacement(HandleRef hWnd, [In] ref NativeMethods.WINDOWPLACEMENT placement); 1025internal static void SetWindowPlacement(HandleRef hWnd, [In] ref NativeMethods.WINDOWPLACEMENT placement) 1046internal static extern bool SystemParametersInfo(int nAction, int nParam, [In, Out] NativeMethods.ANIMATIONINFO anim, int nUpdate); 1054internal static extern bool SystemParametersInfo(int nAction, int nParam, [In, Out] NativeMethods.ICONMETRICS metrics, int nUpdate); 1182[In] ref NativeMethods.MOUSEMOVEPOINT pointsIn, 1183[Out] NativeMethods.MOUSEMOVEPOINT[] pointsBufferOut, 1466ref NativeMethods.InternetCacheConfigInfo pInternetCacheConfigInfo, 1524public NativeMethods.ColorSpace phDataColorSpace; // color space of data 1547public NativeMethods.ProfileType dwType; // profile type 1588public NativeMethods.POINT pt;
Shared\MS\Win32\UnsafeNativeMethodsTextServices.cs (1)
887public NativeMethods.VARIANT val;