2940 references to HandleRef
PresentationCore (136)
Core\CSharp\MS\Internal\Automation\ElementUtil.cs (1)
155SafeSecurityHelper.TransformLocalRectToScreen(new HandleRef(null, hwnd), ref rcWin32);
Core\CSharp\MS\Internal\FontCache\FontCacheUtil.cs (3)
498HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 511_dpi = MS.Win32.UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), NativeMethods.LOGPIXELSY); 516MS.Win32.UnsafeNativeMethods.ReleaseDC(desktopWnd, new HandleRef(null, dc));
Core\CSharp\MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (1)
428new HandleRef(null, hModule), "GetAlternateList") != IntPtr.Zero ?
Core\CSharp\System\Windows\Automation\Peers\GenericRootAutomationPeer.cs (2)
60UnsafeNativeMethods.GetWindowText(new HandleRef(null, hwnd), sb, sb.Capacity); 96SafeNativeMethods.GetWindowRect(new HandleRef(null, hwnd), ref rc);
Core\CSharp\System\Windows\Clipboard.cs (1)
676IntPtr entryPoint = UnsafeNativeMethods.GetProcAddressNoThrow(new HandleRef(null, hModule), "WldpIsDynamicCodePolicyEnabled");
Core\CSharp\System\Windows\DataObject.cs (43)
831Win32GlobalFree(new HandleRef(this, medium.unionmember)); 1616hDC = Win32GetDC(new HandleRef(this, IntPtr.Zero)); 1619sourceDC = Win32CreateCompatibleDC(new HandleRef(this, hDC)); 1622sourceObject = Win32SelectObject(new HandleRef(this, sourceDC), hBitmap); 1625destinationDC = Win32CreateCompatibleDC(new HandleRef(this, hDC)); 1628hBitmapNew = Win32CreateCompatibleBitmap(new HandleRef(this, hDC), width, height); 1631destinationObject = Win32SelectObject(new HandleRef(this, destinationDC), hBitmapNew); 1637Win32BitBlt(new HandleRef(this, destinationDC), width, height, new HandleRef(null, sourceDC), /* SRCCOPY */0x00CC0020); 1642Win32SelectObject(new HandleRef(this, sourceDC), sourceObject); 1643Win32SelectObject(new HandleRef(this, destinationDC), destinationObject); 1646Win32DeleteDC(new HandleRef(this, sourceDC)); 1647Win32DeleteDC(new HandleRef(this, destinationDC)); 1650Win32ReleaseDC(new HandleRef(this, IntPtr.Zero), new HandleRef(this, hDC)); 1656Win32DeleteObject(new HandleRef(this, hBitmap)); 2041ptr = Win32GlobalLock(new HandleRef(this, handle)); 2054Win32GlobalUnlock(new HandleRef(this, handle)); 2088Win32DeleteObject(new HandleRef(this, hbitmap)); 2168basePtr = Win32GlobalLock(new HandleRef(this, handle)); 2208Win32GlobalUnlock(new HandleRef(this, handle)); 2243ptr = Win32GlobalLock(new HandleRef(this, handle)); 2264Win32GlobalUnlock(new HandleRef(this, handle)); 2298ptr = Win32GlobalLock(new HandleRef(this, handle)); 2314Win32GlobalUnlock(new HandleRef(this, handle)); 2356pointerUtf8 = Win32GlobalLock(new HandleRef(this, handle)); 2374Win32GlobalUnlock(new HandleRef(this, handle)); 2474int byteCount = NativeMethods.IntPtrToInt32(Win32GlobalSize(new HandleRef(this, handle))); 2483handle = Win32GlobalReAlloc(new HandleRef(this, handle), 2541Win32DeleteObject(new HandleRef(null, hbitmap)); 3104IntPtr ptr = Win32GlobalLock(new HandleRef(this, hglobal)); 3115Win32GlobalUnlock(new HandleRef(this, hglobal)); 3121Win32GlobalFree(new HandleRef(this, hglobal)); 3380ptr = Win32GlobalLock(new HandleRef(this, handle)); 3388size = NativeMethods.IntPtrToInt32(Win32GlobalSize(new HandleRef(this, handle))); 3426Win32GlobalUnlock(new HandleRef(this, handle)); 3519count = UnsafeNativeMethods.DragQueryFile(new HandleRef(this, hdrop), unchecked((int)0xFFFFFFFF), null, 0); 3526if (UnsafeNativeMethods.DragQueryFile(new HandleRef(this, hdrop), i, sb, sb.Capacity) != 0) 3552ptr = Win32GlobalLock(new HandleRef(this, handle)); 3566Win32GlobalUnlock(new HandleRef(this, handle)); 3583int utf8ByteSize = NativeMethods.IntPtrToInt32(Win32GlobalSize(new HandleRef(this, handle))); 3585IntPtr pointerUtf8 = Win32GlobalLock(new HandleRef(this, handle)); 3621Win32GlobalUnlock(new HandleRef(this, handle));
Core\CSharp\System\Windows\DragDrop.cs (2)
494new HandleRef(null, windowHandle), 518new HandleRef(null, windowHandle));
Core\CSharp\System\Windows\Input\Cursor.cs (1)
369_cursorHandle = SafeNativeMethods.LoadCursor(new HandleRef(this,IntPtr.Zero), (IntPtr)(CursorTypes[(int)cursorType]));
Core\CSharp\System\Windows\Input\InputMethod.cs (42)
601IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 602bool fOpen = UnsafeNativeMethods.ImmGetOpenStatus(new HandleRef(this, himc)); 603UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 640IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 641bool fOpen = UnsafeNativeMethods.ImmGetOpenStatus(new HandleRef(this, himc)); 646UnsafeNativeMethods.ImmSetOpenStatus(new HandleRef(this, himc), (value == InputMethodState.On)); 649UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 872IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 873UnsafeNativeMethods.ImmGetConversionStatus(new HandleRef(this, himc), ref convmode, ref sentence); 874UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 1013IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1014UnsafeNativeMethods.ImmGetConversionStatus(new HandleRef(this, himc), ref convmode, ref sentence); 1074UnsafeNativeMethods.ImmSetConversionStatus(new HandleRef(this, himc), convmodeNew, sentence); 1077UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 1137IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1138UnsafeNativeMethods.ImmGetConversionStatus(new HandleRef(this, himc), ref convmode, ref sentence); 1139UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 1211IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1212UnsafeNativeMethods.ImmGetConversionStatus(new HandleRef(this, himc), ref convmode, ref sentence); 1229UnsafeNativeMethods.ImmSetConversionStatus(new HandleRef(this, himc), convmode, sentenceNew); 1232UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 1455UnsafeNativeMethods.ImmAssociateContext(new HandleRef(this, hwnd), new HandleRef(this, _defaultImc.Value)); 1463UnsafeNativeMethods.ImmAssociateContext(new HandleRef(this, hwnd), new HandleRef(this, IntPtr.Zero)); 1531IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1532UnsafeNativeMethods.ImmGetConversionStatus(new HandleRef(this, himc), ref immConvMode, ref sentence); 1533UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 1666UnsafeNativeMethods.ImmConfigureIME(new HandleRef(this, hkl), new HandleRef(this, HwndFromInputElement(element)), NativeMethods.IME_CONFIG_GENERAL, IntPtr.Zero); 1731UnsafeNativeMethods.ImmConfigureIME(new HandleRef(this, hkl), new HandleRef(this, HwndFromInputElement(element)), NativeMethods.IME_CONFIG_REGISTERWORD, ref regWord); 1929IntPtr hwnd = UnsafeNativeMethods.ImmGetDefaultIMEWnd(new HandleRef(this, IntPtr.Zero)); 1930IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1935UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc));
Core\CSharp\System\Windows\Input\InputProcessorProfiles.cs (1)
157SafeNativeMethods.ActivateKeyboardLayout(new HandleRef(this,hklList[i]), 0);
Core\CSharp\System\Windows\Input\MouseDevice.cs (1)
2206if (!SafeNativeMethods.IsWindowEnabled(new HandleRef(null, hwndHit)))
Core\CSharp\System\Windows\Interop\HwndKeyboardInputProvider.cs (3)
530UnsafeNativeMethods.TrySetFocus(new HandleRef(this, hwndRestoreFocus), ref hwndRestoreFocus); 872int windowStyle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this,hwnd), NativeMethods.GWL_STYLE); 878IntPtr hwndParent = UnsafeNativeMethods.GetParent(new HandleRef(this, hwnd));
Core\CSharp\System\Windows\Interop\HwndMouseInputProvider.cs (3)
529SafeNativeMethods.ScreenToClient(new HandleRef(this,hwnd), pt); 1021SafeNativeMethods.GetClientRect(new HandleRef(this,hwndToCheck), ref rcClient); 1022SafeNativeMethods.ScreenToClient(new HandleRef(this,hwndToCheck), ptCursor);
Core\CSharp\System\Windows\Interop\HwndPanningFeedback.cs (1)
67return new HandleRef(_hwndSource, handle);
Core\CSharp\System\Windows\Interop\HwndSource.cs (14)
327UnsafeNativeMethods.CriticalSetWindowTheme(new HandleRef(this, _hwndWrapper.Handle), "", ""); 873UnsafeNativeMethods.HideCaret(new HandleRef(this, IntPtr.Zero)); 905UnsafeNativeMethods.ShowCaret(new HandleRef(this, IntPtr.Zero)); 977UnsafeNativeMethods.SetWindowPos(new HandleRef(this,_hwndWrapper.Handle), new HandleRef(null,IntPtr.Zero), 1005IntPtr hwndRoot = UnsafeNativeMethods.GetAncestor(new HandleRef(this, CriticalHandle), NativeMethods.GA_ROOT); 1008UnsafeNativeMethods.PostMessage(new HandleRef(this, hwndRoot), MS.Internal.Interop.WindowMessage.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_KEYMENU), new IntPtr(NativeMethods.VK_SPACE)); 1055int style = NativeMethods.IntPtrToInt32((IntPtr)SafeNativeMethods.GetWindowStyle(new HandleRef(this, _hwndWrapper.Handle), false)); 1056int styleEx = NativeMethods.IntPtrToInt32((IntPtr)SafeNativeMethods.GetWindowStyle(new HandleRef(this, _hwndWrapper.Handle), true)); 1157return new HandleRef(this,Handle); 1372SafeNativeMethods.GetClientRect(new HandleRef(this,_hwndWrapper.Handle), ref rc); 1594SafeNativeMethods.GetWindowRect(new HandleRef(this, _hwndWrapper.Handle), ref windowRect); 1783hwndRoot = UnsafeNativeMethods.GetAncestor(new HandleRef(this, CriticalHandle), NativeMethods.GA_ROOT); 1790SafeNativeMethods.GetWindowRect(new HandleRef(this, hwndRoot), ref rc);
Core\CSharp\System\Windows\Interop\HwndStylusInputProvider.cs (3)
62UnsafeNativeMethods.SetProp(new HandleRef(this, sourceHandle), "MicrosoftTabletPenServiceProperty", new HandleRef(null, new IntPtr(MultiTouchEnabledFlag))); 129SafeNativeMethods.ScreenToClient(new HandleRef(this, hwnd), pt1);
Core\CSharp\System\Windows\Interop\HwndTarget.cs (6)
554normalizedHwnd = new HandleRef(wrapperObject, hwndParent); 576new HandleRef(this, hwnd), 580if (!UnsafeNativeMethods.IsWindow(new HandleRef(this, hwnd))) 1931new HandleRef(null, IntPtr.Zero), // HWND_TOP 1958new HandleRef(null, IntPtr.Zero), // HWND_TOP 2092SafeSecurityHelper.TransformLocalRectToScreen(new HandleRef(null, hwndParent), ref windowRectInScreenCoords);
Core\CSharp\System\Windows\Media\MediaContextNotificationWindow.cs (1)
252new HandleRef(null, user32Module),
Core\CSharp\System\Windows\UIElement.cs (4)
1158HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 1175dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), NativeMethods.LOGPIXELSX); 1176dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), NativeMethods.LOGPIXELSY); 1182UnsafeNativeMethods.ReleaseDC(desktopWnd, new HandleRef(null, dc));
Shared\MS\Internal\PointUtil.cs (2)
190HandleRef handleRef = new HandleRef(inputSource, inputSource.CriticalHandle); 218HandleRef handleRef = new HandleRef(inputSource, inputSource.CriticalHandle);
Shared\MS\Internal\SafeSecurityHelper.cs (1)
71int retval = MS.Internal.WindowsBase.NativeMethodsSetLastError.MapWindowPoints(hwnd , new HandleRef(null, IntPtr.Zero), ref rcWindowCoords, 2);
PresentationFramework (150)
src\Framework\Microsoft\Win32\CommonDialog.cs (2)
276MoveToScreenCenter(new HandleRef(this,hwnd)); 338new HandleRef(this, _hwndOwnerWindow), // window to find monitor location for
src\Framework\Microsoft\Win32\FileDialog.cs (8)
699_hwndFileDialog = UnsafeNativeMethods.GetParent(new HandleRef(this, hwnd)); 740MoveToScreenCenter(new HandleRef(this, _hwndFileDialog)); 882UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this, hwnd), // hWnd (which window are we affecting) 903UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this, hwnd), // hWnd (which window are we affecting) 1195UnsafeNativeMethods.SetFocus(new HandleRef(this, focusHandle)); 1762if (!UnsafeNativeMethods.IsWindow(new HandleRef(this, _hwndFileDialog))) 1768int textLen = UnsafeNativeMethods.GetWindowTextLength(new HandleRef(this, _hwndFileDialog)); 1772UnsafeNativeMethods.GetWindowText(new HandleRef(this, _hwndFileDialog),
src\Framework\MS\Internal\AppModel\AppSecurityManager.cs (1)
157UnsafeNativeMethods.ShellExecute( new HandleRef( null, IntPtr.Zero) , /*hwnd*/
src\Framework\MS\Internal\AppModel\IconHelper.cs (2)
53var hdcDesktop = new HandleRef(null, UnsafeNativeMethods.GetDC(new HandleRef())); 261new HandleRef(null, IntPtr.Zero), // A device context. Pass null in if no DIB_PAL_COLORS is used.
src\Framework\MS\Internal\AppModel\PresentationAppDomainManager.cs (1)
114new HandleRef(null, ElevationPromptOwnerWindow), NativeMethods.GA_ROOT);
src\Framework\MS\Internal\AppModel\RootBrowserWindow.cs (2)
291IntPtr topWindow = UnsafeNativeMethods.GetAncestor(new HandleRef(this, CriticalHandle), 2/*GA_ROOT*/); 392handleRef = new HandleRef( this, CriticalHandle ) ;
src\Framework\MS\Internal\Controls\ActiveXHelper.cs (4)
104logPixelsX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSX); 105UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 132logPixelsY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSY); 133UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC));
src\Framework\MS\Internal\Printing\Win32PrintDialog.cs (1)
153if(0 != MS.Win32.UnsafeNativeMethods.MessageBox(new HandleRef(null, owner), message, caption, type))
src\Framework\System\Windows\Automation\Peers\WindowAutomationPeer.cs (2)
52UnsafeNativeMethods.GetWindowText(new HandleRef(null, window.CriticalHandle), sb, sb.Capacity); 89try { SafeNativeMethods.GetWindowRect(new HandleRef(null, windowHandle), ref rc); }
src\Framework\System\Windows\Controls\Primitives\Popup.cs (18)
2682SafeNativeMethods.GetMonitorInfo(new HandleRef(null, monitor), monitorInfo); 2778UnsafeNativeMethods.GetIconInfo(new HandleRef(null, hCursor), out iconInfo); 3145UnsafeNativeMethods.SetWindowPos(new HandleRef(null, Handle), new HandleRef(null, IntPtr.Zero), 3161SafeNativeMethods.GetClientRect(new HandleRef(null, parent), ref rect); 3256UnsafeNativeMethods.SetWindowPos(new HandleRef(null, Handle), 3257lastWebOCHwnd == IntPtr.Zero ? NativeMethods.HWND_TOP : new HandleRef(null, lastWebOCHwnd), 3265UnsafeNativeMethods.ShowWindow(new HandleRef(null, Handle), NativeMethods.SW_SHOWNA); 3269UnsafeNativeMethods.SetWindowPos(new HandleRef(null, Handle), 3286UnsafeNativeMethods.ShowWindow(new HandleRef(null, Handle), NativeMethods.SW_HIDE); 3302IntPtr lastHwnd = UnsafeNativeMethods.GetWindow(new HandleRef(null, Handle), NativeMethods.GW_HWNDLAST); 3308if (UnsafeNativeMethods.GetClassName(new HandleRef(null, lastHwnd), sb, NativeMethods.MAX_PATH) != 0) 3316lastHwnd = UnsafeNativeMethods.GetWindow(new HandleRef(null, lastHwnd), NativeMethods.GW_HWNDPREV); 3352Int32 styles = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_EXSTYLE); 3367UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(null, handle), NativeMethods.GWL_EXSTYLE, (IntPtr)styles); 3526window = UnsafeNativeMethods.GetParent(new HandleRef(null, window)); 3559return UnsafeNativeMethods.GetParent(new HandleRef(null, child)); 3788SafeNativeMethods.GetMonitorInfo(new HandleRef(null, hMonitor), info);
src\Framework\System\windows\Documents\CaretElement.cs (1)
1019bool returnValue = UnsafeNativeMethods.CreateCaret(new HandleRef(null, hwnd), bitmap, /*width*/ 0, /*height*/ 0);
src\Framework\System\Windows\Documents\ImmComposition.cs (26)
254IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 257UnsafeNativeMethods.ImmNotifyIME(new HandleRef(this, himc), NativeMethods.NI_COMPOSITIONSTR, NativeMethods.CPS_COMPLETE, 0); 259UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 505himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 517size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_RESULTSTR, IntPtr.Zero, 0); 525UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_RESULTSTR, result, size); 534size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPSTR, IntPtr.Zero, 0); 541UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPSTR, composition, size); 548cursorPos = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_CURSORPOS, IntPtr.Zero, 0); 556deltaStart = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_DELTASTART, IntPtr.Zero, 0); 564size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPATTR, IntPtr.Zero, 0); 571UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPATTR, attributes, size); 579UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 688himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 803UnsafeNativeMethods.ImmSetCandidateWindow(new HandleRef(this, himc), ref candform); 804UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 886IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 925UnsafeNativeMethods.ImmSetCompositionWindow(new HandleRef(this, himc), ref compform); 926UnsafeNativeMethods.ImmReleaseContext(new HandleRef(this, hwnd), new HandleRef(this, himc)); 1764int prop = UnsafeNativeMethods.ImmGetProperty(new HandleRef(this, SafeNativeMethods.GetKeyboardLayout(0)), NativeMethods.IGP_PROPERTY); 1934IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1943hwndDefIme = UnsafeNativeMethods.ImmGetDefaultIMEWnd(new HandleRef(this, hwnd));
src\Framework\System\Windows\Documents\MoveSizeWinEventHandler.cs (1)
96hwndTemp = UnsafeNativeMethods.GetParent(new HandleRef(this, hwndTemp));
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (1)
330SafeNativeMethods.GetClientRect(new HandleRef(null, hwnd), ref rc);
src\Framework\System\windows\Documents\TextEditorDragDrop.cs (2)
666if (SafeNativeMethods.IsWindowEnabled(new HandleRef(null, helper.Handle))) 707UnsafeNativeMethods.SetForegroundWindow(new HandleRef(null, hwnd));
src\Framework\System\windows\Documents\TextEditorTyping.cs (1)
1661mouseInputPending = UnsafeNativeMethods.PeekMessage(ref message, new HandleRef(null, hwnd), WindowMessage.WM_MOUSEFIRST, WindowMessage.WM_MOUSELAST, NativeMethods.PM_NOREMOVE);
src\Framework\System\Windows\Documents\TextStore.cs (2)
824SafeNativeMethods.ScreenToClient(new HandleRef(null,win32Window.Handle), point); 2522UnsafeNativeMethods.ClientToScreen(new HandleRef(null, hwnd), /* ref by interop */ clientPoint);
src\Framework\System\Windows\Interop\ActiveXHost.cs (1)
584_axWindow = new HandleRef(this, hwnd);
src\Framework\System\Windows\Interop\HwndHost.cs (16)
521NativeMethods.RECT rcClientRTLAdjusted = PointUtil.AdjustForRightToLeft(rcClient, new HandleRef(null, hwndParent)); 697_hwnd = new HandleRef(null, IntPtr.Zero); 809new HandleRef(null, IntPtr.Zero), 902HandleRef hdcScreen = new HandleRef(this, UnsafeNativeMethods.GetDC(new HandleRef(this, IntPtr.Zero))); 905HandleRef hdcBitmap = new HandleRef(this, IntPtr.Zero); 906HandleRef hBitmap = new HandleRef(this, IntPtr.Zero); 967UnsafeNativeMethods.ReleaseDC(new HandleRef(this, IntPtr.Zero), hdcScreen); 968hdcScreen = new HandleRef(null, IntPtr.Zero); 973hBitmap = new HandleRef(this, IntPtr.Zero); 979hdcBitmap = new HandleRef(this, IntPtr.Zero); 1187BuildWindow(new HandleRef(null, hwndParent)); 1196UnsafeNativeMethods.SetParent(_hwnd, new HandleRef(null,hwndParent)); 1205UnsafeNativeMethods.SetParent(_hwnd, new HandleRef(null, hwnd.Handle)); 1246int windowStyle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this,_hwnd.Handle), NativeMethods.GWL_STYLE); 1327_hwnd = new HandleRef(null, IntPtr.Zero); 1350_hwnd = new HandleRef(null, IntPtr.Zero);
src\Framework\System\Windows\MessageBox.cs (1)
508MessageBoxResult result = Win32ToMessageBoxResult (UnsafeNativeMethods.MessageBox (new HandleRef (null, owner), messageBoxText, caption, style));
src\Framework\System\Windows\SystemParameters.cs (3)
6388HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 6405_dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), NativeMethods.LOGPIXELSX); 6410UnsafeNativeMethods.ReleaseDC(desktopWnd, new HandleRef(null, dc));
src\Framework\System\Windows\Window.cs (54)
359if (UnsafeNativeMethods.IsWindow( new HandleRef( null, _dialogOwnerHandle ) ) != true) 393style = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, _dialogOwnerHandle), NativeMethods.GWL_STYLE); 396_dialogOwnerHandle = UnsafeNativeMethods.GetParent(new HandleRef(null, _dialogOwnerHandle)); 497(UnsafeNativeMethods.IsWindow(new HandleRef(null, _dialogPreviousActiveHandle)) == true)) 507UnsafeNativeMethods.TrySetFocus(new HandleRef(null, _dialogPreviousActiveHandle), ref _dialogPreviousActiveHandle); 579return UnsafeNativeMethods.SetForegroundWindow(new HandleRef(null, CriticalHandle)); 2911UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), 2912new HandleRef(null, IntPtr.Zero), 3004UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), 3005new HandleRef(null, IntPtr.Zero), 3097UnsafeNativeMethods.SetWindowText(new HandleRef(this, CriticalHandle), title); 3117UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), 3118new HandleRef(null, IntPtr.Zero), 3690if (SafeNativeMethods.IsWindowVisible(new HandleRef(null, hWnd)) && 3691SafeNativeMethods.IsWindowEnabled(new HandleRef(null, hWnd))) 3716if (UnsafeNativeMethods.IsWindow(new HandleRef(null, hWnd))) 3721UnsafeNativeMethods.EnableWindowNoThrow(new HandleRef(null, hWnd), state); 3944if ((_ownerHandle != IntPtr.Zero) && UnsafeNativeMethods.IsWindow(new HandleRef(null, _ownerHandle))) 3993SafeNativeMethods.GetMonitorInfo(new HandleRef(null, hMonitor), monitorInfo); 4004IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new HandleRef(null, hwnd), NativeMethods.MONITOR_DEFAULTTONEAREST); 4080int styleEx = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, hwndHandle), NativeMethods.GWL_EXSTYLE); 4084UnsafeNativeMethods.GetWindowPlacement(new HandleRef(this, hwndHandle), ref wp); 4245new HandleRef(this, CriticalHandle), 4323UnsafeNativeMethods.SetWindowLong(new HandleRef(null, CriticalHandle), 4648(UnsafeNativeMethods.IsWindow(new HandleRef(this, _dialogPreviousActiveHandle)) == true)) 4650UnsafeNativeMethods.SetActiveWindow(new HandleRef(this, _dialogPreviousActiveHandle)); 5337UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), NativeMethods.NullHandleRef, 0, 0, 0, 0, 5354UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), NativeMethods.NullHandleRef, 0, 0, 0, 0, 5403HandleRef hr = new HandleRef(this, CriticalHandle); 5565UnsafeNativeMethods.SetWindowPos(new HandleRef(null, CriticalHandle), 5806UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), 5813UnsafeNativeMethods.ShowWindow(new HandleRef(this, CriticalHandle), nCmd); 6191UnsafeNativeMethods.GetWindowPlacement(new HandleRef(this, CriticalHandle), ref wp); 6257UnsafeNativeMethods.SetWindowPlacement(new HandleRef(this, CriticalHandle), ref wp); 6280IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new HandleRef(this, CriticalHandle), NativeMethods.MONITOR_DEFAULTTONULL); 6287SafeNativeMethods.GetMonitorInfo(new HandleRef(this, hMonitor), monitorInfo); 6528UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), 6529new HandleRef(null, IntPtr.Zero), 6717UnsafeNativeMethods.PostMessage(new HandleRef(this, CriticalHandle), WM_APPLYTASKBARITEMINFO, IntPtr.Zero, IntPtr.Zero); 6981SafeNativeMethods.GetClientRect(new HandleRef(this, CriticalHandle), ref physicalClientRc); 7207UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_STYLE, (IntPtr)_styleDoNotUse.Value); 7208UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_EXSTYLE, (IntPtr)_styleExDoNotUse.Value); 7210UnsafeNativeMethods.SetWindowPos(new HandleRef(this, CriticalHandle), NativeMethods.NullHandleRef, 0, 0, 0, 0, 7865monitor = SafeNativeMethods.MonitorFromWindow( new HandleRef( this, CriticalHandle), NativeMethods.MONITOR_DEFAULTTONEAREST ); 7868SafeNativeMethods.GetMonitorInfo( new HandleRef ( this, monitor ) , monitorInfo); 7886SafeNativeMethods.GetClientRect(new HandleRef(this, CriticalHandle), ref rc); 7902SafeNativeMethods.GetWindowRect(new HandleRef(this, CriticalHandle), ref rc); 7922SafeNativeMethods.GetClientRect(new HandleRef(this, CriticalHandle), ref rc); 7927UnsafeNativeMethods.ClientToScreen(new HandleRef(this, _sourceWindow.CriticalHandle), pt); 8042return UnsafeNativeMethods.GetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_EXSTYLE); 8061return UnsafeNativeMethods.GetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_STYLE); 8410var nullHandle = new HandleRef(null, IntPtr.Zero); 8417UnsafeNativeMethods.ReleaseDC(nullHandle, new HandleRef(null, hdc)); 8458new HandleRef(null, hMonitor),
System (51)
compmod\microsoft\win32\NativeMethods.cs (1)
58public readonly static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero);
compmod\microsoft\win32\SystemEvents.cs (21)
126if (UnsafeNativeMethods.GetUserObjectInformation(new HandleRef(null, hwinsta), NativeMethods.UOI_FLAGS, flags, Marshal.SizeOf(flags), ref lengthNeeded)) { 414defWindowProc = UnsafeNativeMethods.GetProcAddress(new HandleRef(this, UnsafeNativeMethods.GetModuleHandle("user32.dll")), defproc); 439if (!UnsafeNativeMethods.GetClassInfo(new HandleRef(this, hInstance), WndClass.lpszClassName, wndclassi)) { 455if (0 != UnsafeNativeMethods.UnregisterClass(WndClass.lpszClassName, new HandleRef(null, UnsafeNativeMethods.GetModuleHandle(null)))) { 476new HandleRef(this, hInstance), null); 493IntPtr timerId = UnsafeNativeMethods.SendMessage(new HandleRef(systemEvents, systemEvents.windowHandle), 508UnsafeNativeMethods.WTSUnRegisterSessionNotification(new HandleRef(systemEvents, systemEvents.windowHandle)); 514HandleRef href = new HandleRef(this, handle); 519UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new HandleRef(this, DefWndProc)); 536UnsafeNativeMethods.UnregisterClass(className, new HandleRef(this, hInstance)); 608UnsafeNativeMethods.WTSRegisterSessionNotification(new HandleRef(systemEvents, systemEvents.windowHandle), NativeMethods.NOTIFY_FOR_THIS_SESSION); 610SafeNativeMethods.FreeLibrary(new HandleRef(null, retval)); 833UnsafeNativeMethods.PostMessage(new HandleRef(systemEvents, systemEvents.windowHandle), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero); 843int res = (int) UnsafeNativeMethods.SendMessage(new HandleRef(systemEvents, systemEvents.windowHandle), 857IntPtr res = UnsafeNativeMethods.SetTimer(new HandleRef(this, windowHandle), new HandleRef(this, timerId), (int) wParam, NativeMethods.NullHandleRef); 891bool res = UnsafeNativeMethods.KillTimer(new HandleRef(this, windowHandle), new HandleRef(this, wParam)); 1414UnsafeNativeMethods.PostMessage(new HandleRef(systemEvents, systemEvents.windowHandle), NativeMethods.WM_QUIT, IntPtr.Zero, IntPtr.Zero); 1450UnsafeNativeMethods.PostMessage(new HandleRef(this, windowHandle), NativeMethods.WM_REFLECT + msg, wParam, newStringPtr); 1463UnsafeNativeMethods.PostMessage(new HandleRef(this, windowHandle), NativeMethods.WM_REFLECT + msg, wParam, lParam);
compmod\system\codedom\compiler\Executor.cs (1)
261new HandleRef(null, environmentPtr), // IntPtr lpEnvironment,
services\io\system\io\FileSystemWatcher.cs (1)
730new HandleRef(this, (IntPtr) buffPtr),
services\monitoring\system\diagnosticts\EventLogInternal.cs (1)
1719sid, (short) strings.Length, rawData.Length, new HandleRef(this, stringsRootHandle.AddrOfPinnedObject()), rawData);
services\monitoring\system\diagnosticts\FileVersionInfo.cs (4)
330if (UnsafeNativeMethods.VerQueryValue(new HandleRef(null, memPtr), "\\", ref memRef, out memLen)) { 355if (UnsafeNativeMethods.VerQueryValue(new HandleRef(null, memPtr), name, ref memRef, out memLen)) { 370if (UnsafeNativeMethods.VerQueryValue(new HandleRef(null, memPtr), "\\VarFileInfo\\Translation", ref memRef, out memLen)) { 467if (UnsafeNativeMethods.GetFileVersionInfo(fileName, 0, infoSize, new HandleRef(null, memIntPtr))) {
services\monitoring\system\diagnosticts\Process.cs (9)
457int length = NativeMethods.GetWindowTextLength(new HandleRef(this, handle)) * 2; 459NativeMethods.GetWindowText(new HandleRef(this, handle), builder, builder.Capacity); 953responding = NativeMethods.SendMessageTimeout(new HandleRef(this, mainWindow), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero, NativeMethods.SMTO_ABORTIFHUNG, 5000, out result) != (IntPtr)0; 1242int style = NativeMethods.GetWindowLong(new HandleRef(this, mainWindowHandle), NativeMethods.GWL_STYLE); 1244NativeMethods.PostMessage(new HandleRef(this, mainWindowHandle), NativeMethods.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 1468if (!NativeMethods.OpenProcessToken(new HandleRef(null, processHandle), NativeMethods.TOKEN_ADJUST_PRIVILEGES, out hToken)) { 1481NativeMethods.AdjustTokenPrivileges(new HandleRef(null, hToken), false, tkp, 0, IntPtr.Zero, IntPtr.Zero); 1927if (!NativeMethods.DuplicateHandle(new HandleRef(this, NativeMethods.GetCurrentProcess()), 1929new HandleRef(this, NativeMethods.GetCurrentProcess()),
services\monitoring\system\diagnosticts\ProcessManager.cs (10)
49if (NativeMethods.GetWindow(new HandleRef(this, handle), NativeMethods.GW_OWNER) != (IntPtr)0 || !NativeMethods.IsWindowVisible(new HandleRef(this, handle))) 70NativeMethods.GetWindowThreadProcessId(new HandleRef(this, handle), out processId); 108new HandleRef(null, NativeMethods.GetCurrentProcess()), 120NativeMethods.AdjustTokenPrivileges(new HandleRef(null,tokenHandle), false, tp, 0, IntPtr.Zero, IntPtr.Zero); 365HandleRef handleRef = new HandleRef(null, handle); 435HandleRef handleRef = new HandleRef(null, handle); 669if (!NativeMethods.GetModuleInformation(processHandle, new HandleRef(null, moduleHandle), ntModuleInfo, Marshal.SizeOf(ntModuleInfo))) 676ret = NativeMethods.GetModuleBaseName(processHandle, new HandleRef(null, moduleHandle), baseName, baseName.Capacity * 2); 681ret = NativeMethods.GetModuleFileNameEx(processHandle, new HandleRef(null, moduleHandle), fileName, fileName.Capacity * 2);
services\monitoring\system\diagnosticts\ProcessThread.cs (1)
360if (NativeMethods.SetThreadAffinityMask(threadHandle, new HandleRef(this, value)) == IntPtr.Zero) {
services\monitoring\system\diagnosticts\processwaithandle.cs (2)
16new HandleRef(this, NativeMethods.GetCurrentProcess()), 18new HandleRef(this, NativeMethods.GetCurrentProcess()),
System.Activities.Presentation (3)
System.Activities.Presentation\System\Activities\Presentation\View\WindowExtensionMethods.cs (3)
26Win32Interop.SetWindowLongPtr(new HandleRef(window, hwnd), Win32Interop.GWL_EXSTYLE, exStyle); 47Win32Interop.SetWindowLongPtr(new HandleRef(window, hwnd), Win32Interop.GWL_STYLE, style); 76Win32Interop.SetWindowLongPtr(new HandleRef(window, hwnd), Win32Interop.GWL_EXSTYLE, exStyle);
System.Configuration (1)
System\Configuration\ClientConfigPaths.cs (1)
118while (((length = UnsafeNativeMethods.GetModuleFileName(new HandleRef(null, IntPtr.Zero), sb, sb.Capacity)) == sb.Capacity)
System.Data (2)
fx\src\data\System\Data\Common\AdapterUtil.cs (1)
1859static internal readonly HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero);
fx\src\data\System\Data\Odbc\OdbcUtils.cs (1)
324return new HandleRef(this, ptr);
System.Drawing (1052)
commonui\System\Drawing\Advanced\AdjustableArrowCap.cs (8)
65int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapHeight(new HandleRef(this, nativeCap), height); 74int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapHeight(new HandleRef(this, nativeCap), out height); 94int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapWidth(new HandleRef(this, nativeCap), width); 103int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapWidth(new HandleRef(this, nativeCap), out width); 123int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapMiddleInset(new HandleRef(this, nativeCap), middleInset); 132int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapMiddleInset(new HandleRef(this, nativeCap), out middleInset); 154int status = SafeNativeMethods.Gdip.GdipSetAdjustableArrowCapFillState(new HandleRef(this, nativeCap), isFilled); 163int status = SafeNativeMethods.Gdip.GdipGetAdjustableArrowCapFillState(new HandleRef(this, nativeCap), out isFilled);
commonui\System\Drawing\Advanced\CustomLineCap.cs (16)
87new HandleRef(fillPath, (fillPath == null) ? IntPtr.Zero : fillPath.nativePath), 88new HandleRef(strokePath, (strokePath == null) ? IntPtr.Zero : strokePath.nativePath), 155int status = SafeNativeMethods.Gdip.GdipCloneCustomLineCap(new HandleRef(this, nativeCap), out cloneCap); 167int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapType(new HandleRef(null, cap), out capType); 171SafeNativeMethods.Gdip.GdipDeleteCustomLineCap(new HandleRef(null, cap)); 184SafeNativeMethods.Gdip.GdipDeleteCustomLineCap(new HandleRef(null, cap)); 194int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapStrokeCaps(new HandleRef(this, nativeCap), startCap, endCap); 206int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapStrokeCaps(new HandleRef(this, nativeCap), out startCap, out endCap); 214int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapStrokeJoin(new HandleRef(this, nativeCap), lineJoin); 224int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapStrokeJoin(new HandleRef(this, nativeCap), out lineJoin); 244int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapBaseCap(new HandleRef(this, nativeCap), baseCap); 253int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapBaseCap(new HandleRef(this, nativeCap), out baseCap); 273int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapBaseInset(new HandleRef(this, nativeCap), inset); 282int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapBaseInset(new HandleRef(this, nativeCap), out inset); 303int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapWidthScale(new HandleRef(this, nativeCap), widthScale); 312int status = SafeNativeMethods.Gdip.GdipGetCustomLineCapWidthScale(new HandleRef(this, nativeCap), out widthScale);
commonui\System\Drawing\Advanced\Font.cs (24)
65new HandleRef(this, this.fontFamily.NativeFamily), 315status = SafeNativeMethods.Gdip.GdipGetFontUnit(new HandleRef(this, nativeFont), out unit); 320status = SafeNativeMethods.Gdip.GdipGetFontSize(new HandleRef(this, nativeFont), out size); 325status = SafeNativeMethods.Gdip.GdipGetFontStyle(new HandleRef(this, nativeFont), out style); 330status = SafeNativeMethods.Gdip.GdipGetFamily(new HandleRef(this, nativeFont), out nativeFamily); 390status = SafeNativeMethods.Gdip.GdipGetFontSize(new HandleRef(this, this.nativeFont), out this.fontSize); 407SafeNativeMethods.GetObject(new HandleRef(null, hfont), lf); 415UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC)); 435UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC)); 454status = SafeNativeMethods.Gdip.GdipCreateFontFromLogfontA(new HandleRef(null, hdc), lf, out font); 456status = SafeNativeMethods.Gdip.GdipCreateFontFromLogfontW(new HandleRef(null, hdc), lf, out font); 491int status = SafeNativeMethods.Gdip.GdipCreateFontFromDC(new HandleRef(null, hdc), ref font); 513int status = SafeNativeMethods.Gdip.GdipCloneFont(new HandleRef(this, nativeFont), out cloneFont); 590SafeNativeMethods.Gdip.GdipDeleteFont(new HandleRef(this, this.nativeFont)); 815UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC)); 833status = SafeNativeMethods.Gdip.GdipGetLogFontA(new HandleRef(this, this.NativeFont), new HandleRef(graphics, graphics.NativeGraphics), logFont); 835status = SafeNativeMethods.Gdip.GdipGetLogFontW(new HandleRef(this, this.NativeFont), new HandleRef(graphics, graphics.NativeGraphics), logFont); 917int status = SafeNativeMethods.Gdip.GdipGetFontHeight(new HandleRef(this, this.NativeFont), new HandleRef(graphics, graphics.NativeGraphics), out ht); 940UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC)); 954int status = SafeNativeMethods.Gdip.GdipGetFontHeightGivenDPI(new HandleRef(this, this.NativeFont), dpi, out ht); 1013UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC));
commonui\System\Drawing\Advanced\FontCollection.cs (3)
59int status = SafeNativeMethods.Gdip.GdipGetFontCollectionFamilyCount(new HandleRef(this, nativeFontCollection), out numSought); 68status = SafeNativeMethods.Gdip.GdipGetFontCollectionFamilyList(new HandleRef(this, nativeFontCollection), numSought, gpfamilies, 79SafeNativeMethods.Gdip.GdipCloneFontFamily(new HandleRef(null, (IntPtr)gpfamilies[f]), out native);
commonui\System\Drawing\Advanced\FontFamily.cs (8)
126int status = SafeNativeMethods.Gdip.GdipCreateFontFamilyFromName(name, new HandleRef(fontCollection, nativeFontCollection), out fontfamily); 280SafeNativeMethods.Gdip.GdipDeleteFontFamily(new HandleRef(this, this.nativeFamily)); 325int status = SafeNativeMethods.Gdip.GdipGetFamilyName(new HandleRef(this, this.NativeFamily), name, language); 453int status = SafeNativeMethods.Gdip.GdipIsStyleAvailable(new HandleRef(this, this.NativeFamily), style, out bresult); 469int status = SafeNativeMethods.Gdip.GdipGetEmHeight(new HandleRef(this, this.NativeFamily), style, out result); 487int status = SafeNativeMethods.Gdip.GdipGetCellAscent(new HandleRef(this, this.NativeFamily), style, out result); 504int status = SafeNativeMethods.Gdip.GdipGetCellDescent(new HandleRef(this, this.NativeFamily), style, out result); 520int status = SafeNativeMethods.Gdip.GdipGetLineSpacing(new HandleRef(this, this.NativeFamily), style, out result);
commonui\System\Drawing\Advanced\Gdiplus.cs (6)
4144int result = GetClipRgn(new HandleRef(null, hDC), new HandleRef(null, hTempRgn)); 4152DeleteObject(new HandleRef(null, hTempRgn)); 4159SelectClipRgn(new HandleRef(null, hDC), new HandleRef(null, hRgn)); 4163DeleteObject(new HandleRef(null, hRgn));
commonui\System\Drawing\Advanced\GraphicsPath.cs (107)
108int status = SafeNativeMethods.Gdip.GdipCreatePath2(new HandleRef(null, ptbuf), new HandleRef(null, typebuf), count, 161int status = SafeNativeMethods.Gdip.GdipCreatePath2I(new HandleRef(null, ptbuf), new HandleRef(null, typebuf), count, 185int status = SafeNativeMethods.Gdip.GdipClonePath(new HandleRef(this, nativePath), out clonePath); 223SafeNativeMethods.Gdip.GdipDeletePath(new HandleRef(this, nativePath)); 260int status = SafeNativeMethods.Gdip.GdipResetPath(new HandleRef(this, nativePath)); 278int status = SafeNativeMethods.Gdip.GdipGetPathFillMode(new HandleRef(this, nativePath), out fillmode); 293int status = SafeNativeMethods.Gdip.GdipSetPathFillMode(new HandleRef(this, nativePath), (int) value); 321int status = SafeNativeMethods.Gdip.GdipGetPathData(new HandleRef(this, nativePath), memoryPathData); 359int status = SafeNativeMethods.Gdip.GdipStartPathFigure(new HandleRef(this, nativePath)); 373int status = SafeNativeMethods.Gdip.GdipClosePathFigure(new HandleRef(this, nativePath)); 386int status = SafeNativeMethods.Gdip.GdipClosePathFigures(new HandleRef(this, nativePath)); 399int status = SafeNativeMethods.Gdip.GdipSetPathMarker(new HandleRef(this, nativePath)); 410int status = SafeNativeMethods.Gdip.GdipClearPathMarkers(new HandleRef(this, nativePath)); 421int status = SafeNativeMethods.Gdip.GdipReversePath(new HandleRef(this, nativePath)); 434int status = SafeNativeMethods.Gdip.GdipGetPathLastPoint(new HandleRef(this, nativePath), gppt); 489int status = SafeNativeMethods.Gdip.GdipIsVisiblePathPoint(new HandleRef(this, nativePath), 492new HandleRef(graphics, (graphics != null) ? 542int status = SafeNativeMethods.Gdip.GdipIsVisiblePathPointI(new HandleRef(this, nativePath), 545new HandleRef(graphics, (graphics != null) ? 603int status = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPoint(new HandleRef(this, nativePath), 606new HandleRef(pen, pen.NativePen), 607new HandleRef(graphics, (graphics != null) ? 666int status = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPointI(new HandleRef(this, nativePath), 669new HandleRef(pen, pen.NativePen), 670new HandleRef(graphics, (graphics != null) ? 697int status = SafeNativeMethods.Gdip.GdipAddPathLine(new HandleRef(this, nativePath), x1, y1, x2, y2); 713int status = SafeNativeMethods.Gdip.GdipAddPathLine2(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 740int status = SafeNativeMethods.Gdip.GdipAddPathLineI(new HandleRef(this, nativePath), x1, y1, x2, y2); 757int status = SafeNativeMethods.Gdip.GdipAddPathLine2I(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 788int status = SafeNativeMethods.Gdip.GdipAddPathArc(new HandleRef(this, nativePath), x, y, width, height, 814int status = SafeNativeMethods.Gdip.GdipAddPathArcI(new HandleRef(this, nativePath), x, y, width, height, 845int status = SafeNativeMethods.Gdip.GdipAddPathBezier(new HandleRef(this, nativePath), x1, y1, x2, y2, 864int status = SafeNativeMethods.Gdip.GdipAddPathBeziers(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 892int status = SafeNativeMethods.Gdip.GdipAddPathBezierI(new HandleRef(this, nativePath), x1, y1, x2, y2, 911int status = SafeNativeMethods.Gdip.GdipAddPathBeziersI(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 936int status = SafeNativeMethods.Gdip.GdipAddPathCurve(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 953int status = SafeNativeMethods.Gdip.GdipAddPathCurve2(new HandleRef(this, nativePath), new HandleRef(null, buf), 974int status = SafeNativeMethods.Gdip.GdipAddPathCurve3(new HandleRef(this, nativePath), new HandleRef(null, buf), 997int status = SafeNativeMethods.Gdip.GdipAddPathCurveI(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 1016int status = SafeNativeMethods.Gdip.GdipAddPathCurve2I(new HandleRef(this, nativePath), new HandleRef(null, buf), 1037int status = SafeNativeMethods.Gdip.GdipAddPathCurve3I(new HandleRef(this, nativePath), new HandleRef(null, buf), 1060int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 1080int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length, tension); 1101int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurveI(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 1121int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2I(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length, tension); 1134int status = SafeNativeMethods.Gdip.GdipAddPathRectangle(new HandleRef(this, nativePath), rect.X, rect.Y, 1153int status = SafeNativeMethods.Gdip.GdipAddPathRectangles(new HandleRef(this, nativePath), new HandleRef(null, buf), rects.Length); 1169int status = SafeNativeMethods.Gdip.GdipAddPathRectangleI(new HandleRef(this, nativePath), rect.X, rect.Y, 1187int status = SafeNativeMethods.Gdip.GdipAddPathRectanglesI(new HandleRef(this, nativePath), new HandleRef(null, buf), rects.Length); 1215int status = SafeNativeMethods.Gdip.GdipAddPathEllipse(new HandleRef(this, nativePath), x, y, width, height); 1245int status = SafeNativeMethods.Gdip.GdipAddPathEllipseI(new HandleRef(this, nativePath), x, y, width, height); 1272int status = SafeNativeMethods.Gdip.GdipAddPathPie(new HandleRef(this, nativePath), x, y, width, height, 1289int status = SafeNativeMethods.Gdip.GdipAddPathPieI(new HandleRef(this, nativePath), x, y, width, height, 1306int status = SafeNativeMethods.Gdip.GdipAddPathPolygon(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 1324int status = SafeNativeMethods.Gdip.GdipAddPathPolygonI(new HandleRef(this, nativePath), new HandleRef(null, buf), points.Length); 1342int status = SafeNativeMethods.Gdip.GdipAddPathPath(new HandleRef(this, nativePath), new HandleRef(addingPath, addingPath.nativePath), connect); 1365int status = SafeNativeMethods.Gdip.GdipAddPathString(new HandleRef(this, nativePath), 1368new HandleRef(family, (family != null) ? family.NativeFamily : IntPtr.Zero), 1372new HandleRef(format, (format != null) ? format.nativeFormat : IntPtr.Zero)); 1388int status = SafeNativeMethods.Gdip.GdipAddPathStringI(new HandleRef(this, nativePath), 1391new HandleRef(family, (family != null) ? family.NativeFamily : IntPtr.Zero), 1395new HandleRef(format, (format != null) ? format.nativeFormat : IntPtr.Zero)); 1410int status = SafeNativeMethods.Gdip.GdipAddPathString(new HandleRef(this, nativePath), 1413new HandleRef(family, (family != null) ? family.NativeFamily : IntPtr.Zero), 1417new HandleRef(format, (format != null) ? format.nativeFormat : IntPtr.Zero)); 1432int status = SafeNativeMethods.Gdip.GdipAddPathStringI(new HandleRef(this, nativePath), 1435new HandleRef(family, (family != null) ? family.NativeFamily : IntPtr.Zero), 1439new HandleRef(format, (format != null) ? format.nativeFormat : IntPtr.Zero)); 1457int status = SafeNativeMethods.Gdip.GdipTransformPath(new HandleRef(this, nativePath), 1458new HandleRef(matrix, matrix.nativeMatrix)); 1503int status = SafeNativeMethods.Gdip.GdipGetPathWorldBounds(new HandleRef(this, nativePath), 1505new HandleRef(matrix, nativeMatrix), 1506new HandleRef(pen, nativePen)); 1543int status = SafeNativeMethods.Gdip.GdipFlattenPath(new HandleRef(this, nativePath), 1544new HandleRef(matrix, (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix), 1598SafeNativeMethods.Gdip.GdipGetPointCount(new HandleRef(this, nativePath), out pointCount); 1603int status = SafeNativeMethods.Gdip.GdipWidenPath(new HandleRef(this, nativePath), 1604new HandleRef(pen, pen.NativePen), 1605new HandleRef(matrix, nativeMatrix), 1650int status = SafeNativeMethods.Gdip.GdipWarpPath(new HandleRef(this, nativePath), 1651new HandleRef(matrix, (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix), 1652new HandleRef(null, buf), 1678int status = SafeNativeMethods.Gdip.GdipGetPointCount(new HandleRef(this, nativePath), out count); 1700int status = SafeNativeMethods.Gdip.GdipGetPathTypes(new HandleRef(this, nativePath), types, count); 1725int status = SafeNativeMethods.Gdip.GdipGetPathPoints(new HandleRef(this, nativePath), new HandleRef(null, buf), count);
commonui\System\Drawing\Advanced\GraphicsPathIterator.cs (15)
43int status = SafeNativeMethods.Gdip.GdipCreatePathIter(out nativeIter, new HandleRef(path, (path == null) ? IntPtr.Zero : path.nativePath)); 70SafeNativeMethods.Gdip.GdipDeletePathIter(new HandleRef(this, nativeIter)); 110int status = SafeNativeMethods.Gdip.GdipPathIterNextSubpath(new HandleRef(this, nativeIter), out resultCount, 132int status = SafeNativeMethods.Gdip.GdipPathIterNextSubpathPath(new HandleRef(this, nativeIter), out resultCount, 133new HandleRef(path, (path == null) ? IntPtr.Zero : path.nativePath), out isClosed); 151int status = SafeNativeMethods.Gdip.GdipPathIterNextPathType(new HandleRef(this, nativeIter), out resultCount, 170int status = SafeNativeMethods.Gdip.GdipPathIterNextMarker(new HandleRef(this, nativeIter), out resultCount, 189int status = SafeNativeMethods.Gdip.GdipPathIterNextMarkerPath(new HandleRef(this, nativeIter), out resultCount, 190new HandleRef(path, (path == null) ? IntPtr.Zero : path.nativePath)); 206int status = SafeNativeMethods.Gdip.GdipPathIterGetCount(new HandleRef(this, nativeIter), out resultCount); 223int status = SafeNativeMethods.Gdip.GdipPathIterGetSubpathCount(new HandleRef(this, nativeIter), out resultCount); 240int status = SafeNativeMethods.Gdip.GdipPathIterHasCurve(new HandleRef(this, nativeIter), out hasCurve); 254int status = SafeNativeMethods.Gdip.GdipPathIterRewind(new HandleRef(this, nativeIter)); 276int status = SafeNativeMethods.Gdip.GdipPathIterEnumerate(new HandleRef(this, nativeIter), out resultCount, 318int status = SafeNativeMethods.Gdip.GdipPathIterCopyData(new HandleRef(this, nativeIter), out resultCount,
commonui\System\Drawing\Advanced\HatchBrush.cs (4)
82int status = SafeNativeMethods.Gdip.GdipCloneBrush(new HandleRef(this, this.NativeBrush), out cloneBrush); 102int status = SafeNativeMethods.Gdip.GdipGetHatchStyle(new HandleRef(this, this.NativeBrush), out hatchStyle); 121int status = SafeNativeMethods.Gdip.GdipGetHatchForegroundColor(new HandleRef(this, this.NativeBrush), out forecol); 142int status = SafeNativeMethods.Gdip.GdipGetHatchBackgroundColor(new HandleRef(this, this.NativeBrush), out backcol);
commonui\System\Drawing\Advanced\ImageAttributes.cs (23)
107SafeNativeMethods.Gdip.GdipDisposeImageAttributes(new HandleRef(this, nativeImageAttributes)); 146new HandleRef(this, nativeImageAttributes), 216new HandleRef(this, nativeImageAttributes), 246new HandleRef(this, nativeImageAttributes), 286new HandleRef(this, nativeImageAttributes), 313new HandleRef(this, nativeImageAttributes), 338new HandleRef(this, nativeImageAttributes), 363new HandleRef(this, nativeImageAttributes), 388new HandleRef(this, nativeImageAttributes), 413new HandleRef(this, nativeImageAttributes), 437new HandleRef(this, nativeImageAttributes), 464new HandleRef(this, nativeImageAttributes), 491new HandleRef(this, nativeImageAttributes), 517new HandleRef(this, nativeImageAttributes), 542new HandleRef(this, nativeImageAttributes), 570new HandleRef(this, nativeImageAttributes), 595new HandleRef(this, nativeImageAttributes), 630new HandleRef(this, nativeImageAttributes), 634new HandleRef(null, memory)); 661new HandleRef(this, nativeImageAttributes), 714new HandleRef(this, nativeImageAttributes), 733new HandleRef(this, nativeImageAttributes), new HandleRef(null, memory), type);
commonui\System\Drawing\Advanced\LinearGradientBrush.cs (30)
277int status = SafeNativeMethods.Gdip.GdipCloneBrush(new HandleRef(this, this.NativeBrush), out cloneBrush); 291int status = SafeNativeMethods.Gdip.GdipSetLineColors(new HandleRef(this, this.NativeBrush), 308int status = SafeNativeMethods.Gdip.GdipGetLineColors(new HandleRef(this, this.NativeBrush), colors); 338int status = SafeNativeMethods.Gdip.GdipGetLineRect(new HandleRef(this, this.NativeBrush), ref rect); 370int status = SafeNativeMethods.Gdip.GdipGetLineGammaCorrection(new HandleRef(this, this.NativeBrush), 378int status = SafeNativeMethods.Gdip.GdipSetLineGammaCorrection(new HandleRef(this, this.NativeBrush), 408int status = SafeNativeMethods.Gdip.GdipGetLineBlendCount(new HandleRef(this, this.NativeBrush), out retval); 429status = SafeNativeMethods.Gdip.GdipGetLineBlend(new HandleRef(this, this.NativeBrush), factors, positions, count); 472int status = SafeNativeMethods.Gdip.GdipSetLineBlend(new HandleRef(this, this.NativeBrush), new HandleRef(null, factors), new HandleRef(null, positions), count); 520int status = SafeNativeMethods.Gdip.GdipSetLineSigmaBlend(new HandleRef(this, this.NativeBrush), focus, scale); 545int status = SafeNativeMethods.Gdip.GdipSetLineLinearBlend(new HandleRef(this, this.NativeBrush), focus, scale); 565int status = SafeNativeMethods.Gdip.GdipGetLinePresetBlendCount(new HandleRef(this, this.NativeBrush), out retval); 585status = SafeNativeMethods.Gdip.GdipGetLinePresetBlend(new HandleRef(this, this.NativeBrush), colors, positions, count); 671int status = SafeNativeMethods.Gdip.GdipSetLinePresetBlend(new HandleRef(this, this.NativeBrush), new HandleRef(null, colors), new HandleRef(null, positions), count); 704int status = SafeNativeMethods.Gdip.GdipSetLineWrapMode(new HandleRef(this, this.NativeBrush), unchecked((int) wrapMode)); 713int status = SafeNativeMethods.Gdip.GdipGetLineWrapMode(new HandleRef(this, this.NativeBrush), out mode); 751int status = SafeNativeMethods.Gdip.GdipSetLineTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 762int status = SafeNativeMethods.Gdip.GdipGetLineTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 788int status = SafeNativeMethods.Gdip.GdipResetLineTransform(new HandleRef(this, this.NativeBrush)); 819int status = SafeNativeMethods.Gdip.GdipMultiplyLineTransform(new HandleRef(this, this.NativeBrush), 820new HandleRef(matrix, matrix.nativeMatrix), 844int status = SafeNativeMethods.Gdip.GdipTranslateLineTransform(new HandleRef(this, this.NativeBrush), 869int status = SafeNativeMethods.Gdip.GdipScaleLineTransform(new HandleRef(this, this.NativeBrush), 895int status = SafeNativeMethods.Gdip.GdipRotateLineTransform(new HandleRef(this, this.NativeBrush),
commonui\System\Drawing\Advanced\Matrix.cs (32)
94int status = SafeNativeMethods.Gdip.GdipCreateMatrix3(ref gprectf, new HandleRef(null, buf), out matrix); 129int status = SafeNativeMethods.Gdip.GdipCreateMatrix3I(ref gprect, new HandleRef(null, buf), out matrix); 154SafeNativeMethods.Gdip.GdipDeleteMatrix(new HandleRef(this, nativeMatrix)); 175int status = SafeNativeMethods.Gdip.GdipCloneMatrix(new HandleRef(this, nativeMatrix), out cloneMatrix); 196int status = SafeNativeMethods.Gdip.GdipGetMatrixElements(new HandleRef(this, nativeMatrix), buf); 238int status = SafeNativeMethods.Gdip.GdipSetMatrixElements(new HandleRef(this, nativeMatrix), 268int status = SafeNativeMethods.Gdip.GdipMultiplyMatrix(new HandleRef(this, nativeMatrix), new HandleRef(matrix, matrix.nativeMatrix), 295int status = SafeNativeMethods.Gdip.GdipTranslateMatrix(new HandleRef(this, nativeMatrix), 319int status = SafeNativeMethods.Gdip.GdipScaleMatrix(new HandleRef(this, nativeMatrix), scaleX, scaleY, order); 345int status = SafeNativeMethods.Gdip.GdipRotateMatrix(new HandleRef(this, nativeMatrix), angle, order); 375status = SafeNativeMethods.Gdip.GdipTranslateMatrix(new HandleRef(this, nativeMatrix), point.X, point.Y, order); 376status |= SafeNativeMethods.Gdip.GdipRotateMatrix(new HandleRef(this, nativeMatrix), angle, order); 377status |= SafeNativeMethods.Gdip.GdipTranslateMatrix(new HandleRef(this, nativeMatrix), -point.X, -point.Y, order); 380status = SafeNativeMethods.Gdip.GdipTranslateMatrix(new HandleRef(this, nativeMatrix), -point.X, -point.Y, order); 381status |= SafeNativeMethods.Gdip.GdipRotateMatrix(new HandleRef(this, nativeMatrix), angle, order); 382status |= SafeNativeMethods.Gdip.GdipTranslateMatrix(new HandleRef(this, nativeMatrix), point.X, point.Y, order); 395int status = SafeNativeMethods.Gdip.GdipShearMatrix(new HandleRef(this, nativeMatrix), shearX, shearY, MatrixOrder.Prepend); 409int status = SafeNativeMethods.Gdip.GdipShearMatrix(new HandleRef(this, nativeMatrix), shearX, shearY, order); 421int status = SafeNativeMethods.Gdip.GdipInvertMatrix(new HandleRef(this, nativeMatrix)); 441int status = SafeNativeMethods.Gdip.GdipTransformMatrixPoints(new HandleRef(this, nativeMatrix), 442new HandleRef(null, buf), 473int status = SafeNativeMethods.Gdip.GdipTransformMatrixPointsI(new HandleRef(this, nativeMatrix), 474new HandleRef(null, buf), 505int status = SafeNativeMethods.Gdip.GdipVectorTransformMatrixPoints(new HandleRef(this, nativeMatrix), 506new HandleRef(null, buf), 546int status = SafeNativeMethods.Gdip.GdipVectorTransformMatrixPointsI(new HandleRef(this, nativeMatrix), 547new HandleRef(null, buf), 575int status = SafeNativeMethods.Gdip.GdipIsMatrixInvertible(new HandleRef(this, nativeMatrix), out isInvertible); 592int status = SafeNativeMethods.Gdip.GdipIsMatrixIdentity(new HandleRef(this, nativeMatrix), out isIdentity); 615int status = SafeNativeMethods.Gdip.GdipIsMatrixEqual(new HandleRef(this, nativeMatrix), 616new HandleRef(matrix2, matrix2.nativeMatrix),
commonui\System\Drawing\Advanced\Metafile.cs (19)
68int status = SafeNativeMethods.Gdip.GdipCreateMetafileFromWmf(new HandleRef(null, hmetafile), deleteWmf, wmfHeader, out metafile); 94int status = SafeNativeMethods.Gdip.GdipCreateMetafileFromEmf(new HandleRef(null, henhmetafile), deleteEmf, out metafile); 172int status = SafeNativeMethods.Gdip.GdipRecordMetafile(new HandleRef(null, referenceHdc), 237int status = SafeNativeMethods.Gdip.GdipRecordMetafile(new HandleRef(null, referenceHdc), 303status = SafeNativeMethods.Gdip.GdipRecordMetafile(new HandleRef(null, referenceHdc), 312status = SafeNativeMethods.Gdip.GdipRecordMetafileI(new HandleRef(null, referenceHdc), 363int status = SafeNativeMethods.Gdip.GdipRecordMetafileFileName(fileName, new HandleRef(null, referenceHdc), 442new HandleRef(null, referenceHdc), 525new HandleRef(null, referenceHdc), 535new HandleRef(null, referenceHdc), 587new HandleRef(null, referenceHdc), 654new HandleRef(null, referenceHdc), 725new HandleRef(null, referenceHdc), 735new HandleRef(null, referenceHdc), 773int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromWmf(new HandleRef(null, hmetafile), wmfHeader, header.wmf); 796int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromEmf(new HandleRef(null, henhmetafile), header.emf); 913int status = SafeNativeMethods.Gdip.GdipGetMetafileHeaderFromMetafile(new HandleRef(this, nativeImage), memory); 956int status = SafeNativeMethods.Gdip.GdipGetHemfFromMetafile(new HandleRef(this, nativeImage), out hEmf); 977int status = SafeNativeMethods.Gdip.GdipPlayMetafileRecord(new HandleRef(this, nativeImage),
commonui\System\Drawing\Advanced\PathGradientBrush.cs (39)
67int status = SafeNativeMethods.Gdip.GdipCreatePathGradient(new HandleRef(null, pointsBuf), 127int status = SafeNativeMethods.Gdip.GdipCreatePathGradientI(new HandleRef(null, pointsBuf), 164int status = SafeNativeMethods.Gdip.GdipCreatePathGradientFromPath(new HandleRef(path, path.nativePath), 191int status = SafeNativeMethods.Gdip.GdipCloneBrush(new HandleRef(this, this.NativeBrush), out cloneBrush); 212int status = SafeNativeMethods.Gdip.GdipGetPathGradientCenterColor(new HandleRef(this, this.NativeBrush), out argb); 221int status = SafeNativeMethods.Gdip.GdipSetPathGradientCenterColor(new HandleRef(this, this.NativeBrush), value.ToArgb()); 238int status = SafeNativeMethods.Gdip.GdipGetPathGradientSurroundColorCount(new HandleRef(this, this.NativeBrush), 252status = SafeNativeMethods.Gdip.GdipSetPathGradientSurroundColorsWithCount(new HandleRef(this, this.NativeBrush), 264int status = SafeNativeMethods.Gdip.GdipGetPathGradientSurroundColorCount(new HandleRef(this, this.NativeBrush), 272status = SafeNativeMethods.Gdip.GdipGetPathGradientSurroundColorsWithCount(new HandleRef(this, this.NativeBrush), 315int status = SafeNativeMethods.Gdip.GdipGetPathGradientCenterPoint(new HandleRef(this, this.NativeBrush), point); 324int status = SafeNativeMethods.Gdip.GdipSetPathGradientCenterPoint(new HandleRef(this, this.NativeBrush), new GPPOINTF(value)); 337int status = SafeNativeMethods.Gdip.GdipGetPathGradientRect(new HandleRef(this, this.NativeBrush), ref rect); 364int status = SafeNativeMethods.Gdip.GdipGetPathGradientBlendCount(new HandleRef(this, this.NativeBrush), out retval); 384status = SafeNativeMethods.Gdip.GdipGetPathGradientBlend(new HandleRef(this, this.NativeBrush), factors, positions, count); 429int status = SafeNativeMethods.Gdip.GdipSetPathGradientBlend(new HandleRef(this, this.NativeBrush), new HandleRef(null, factors), new HandleRef(null, positions), count); 481int status = SafeNativeMethods.Gdip.GdipSetPathGradientSigmaBlend(new HandleRef(this, this.NativeBrush), focus, scale); 506int status = SafeNativeMethods.Gdip.GdipSetPathGradientLinearBlend(new HandleRef(this, this.NativeBrush), focus, scale); 521int status = SafeNativeMethods.Gdip.GdipGetPathGradientPresetBlendCount(new HandleRef(this, this.NativeBrush), out retval); 548status = SafeNativeMethods.Gdip.GdipGetPathGradientPresetBlend(new HandleRef(this, this.NativeBrush), colors, positions, count); 605int status = SafeNativeMethods.Gdip.GdipSetPathGradientPresetBlend(new HandleRef(this, this.NativeBrush), new HandleRef(null, colors), new HandleRef(null, positions), count); 641int status = SafeNativeMethods.Gdip.GdipSetPathGradientTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 650int status = SafeNativeMethods.Gdip.GdipGetPathGradientTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 679int status = SafeNativeMethods.Gdip.GdipResetPathGradientTransform(new HandleRef(this, this.NativeBrush)); 709int status = SafeNativeMethods.Gdip.GdipMultiplyPathGradientTransform(new HandleRef(this, this.NativeBrush), 710new HandleRef(matrix, matrix.nativeMatrix), 738int status = SafeNativeMethods.Gdip.GdipTranslatePathGradientTransform(new HandleRef(this, this.NativeBrush), 766int status = SafeNativeMethods.Gdip.GdipScalePathGradientTransform(new HandleRef(this, this.NativeBrush), 794int status = SafeNativeMethods.Gdip.GdipRotatePathGradientTransform(new HandleRef(this, this.NativeBrush), 815int status = SafeNativeMethods.Gdip.GdipGetPathGradientFocusScales(new HandleRef(this, this.NativeBrush), scaleX, scaleY); 823int status = SafeNativeMethods.Gdip.GdipSetPathGradientFocusScales(new HandleRef(this, this.NativeBrush), value.X, value.Y); 834int status = SafeNativeMethods.Gdip.GdipSetPathGradientWrapMode(new HandleRef(this, this.NativeBrush), unchecked((int) wrapMode)); 843int status = SafeNativeMethods.Gdip.GdipGetPathGradientWrapMode(new HandleRef(this, this.NativeBrush), out mode);
commonui\System\Drawing\Advanced\PrivateFontCollection.cs (3)
99int status = SafeNativeMethods.Gdip.GdipPrivateAddFontFile(new HandleRef(this, nativeFontCollection), filename); 125int status = SafeNativeMethods.Gdip.GdipPrivateAddMemoryFont(new HandleRef(this, nativeFontCollection), new HandleRef(null, memory), length);
commonui\System\Drawing\Advanced\SafeCustomLineCapHandle.cs (1)
35status = SafeNativeMethods.Gdip.GdipDeleteCustomLineCap(new HandleRef(this, handle));
commonui\System\Drawing\Advanced\StringFormat.cs (20)
164int status = SafeNativeMethods.Gdip.GdipCloneStringFormat(new HandleRef(format, format.nativeFormat), out nativeFormat); 187SafeNativeMethods.Gdip.GdipDeleteStringFormat(new HandleRef(this, nativeFormat)); 214int status = SafeNativeMethods.Gdip.GdipCloneStringFormat(new HandleRef(this, nativeFormat), out cloneFormat); 233int status = SafeNativeMethods.Gdip.GdipGetStringFormatFlags(new HandleRef(this, nativeFormat), out format); 242int status = SafeNativeMethods.Gdip.GdipSetStringFormatFlags(new HandleRef(this, nativeFormat), value); 258int status = SafeNativeMethods.Gdip.GdipSetStringFormatMeasurableCharacterRanges(new HandleRef(this, nativeFormat), ranges.Length, ranges); 274int status = SafeNativeMethods.Gdip.GdipGetStringFormatAlign(new HandleRef(this, nativeFormat), out alignment); 289int status = SafeNativeMethods.Gdip.GdipSetStringFormatAlign(new HandleRef(this, nativeFormat), value); 305int status = SafeNativeMethods.Gdip.GdipGetStringFormatLineAlign(new HandleRef(this, nativeFormat), out alignment); 318int status = SafeNativeMethods.Gdip.GdipSetStringFormatLineAlign(new HandleRef(this, nativeFormat), value); 335int status = SafeNativeMethods.Gdip.GdipGetStringFormatHotkeyPrefix(new HandleRef(this, nativeFormat), out hotkeyPrefix); 350int status = SafeNativeMethods.Gdip.GdipSetStringFormatHotkeyPrefix(new HandleRef(this, nativeFormat), value); 365int status = SafeNativeMethods.Gdip.GdipSetStringFormatTabStops(new HandleRef(this, nativeFormat), firstTabOffset, tabStops.Length, tabStops); 378int status = SafeNativeMethods.Gdip.GdipGetStringFormatTabStopCount(new HandleRef(this, nativeFormat), out count); 384status = SafeNativeMethods.Gdip.GdipGetStringFormatTabStops(new HandleRef(this, nativeFormat), count, out firstTabOffset, tabStops); 404int status = SafeNativeMethods.Gdip.GdipGetStringFormatTrimming(new HandleRef(this, nativeFormat), out trimming); 418int status = SafeNativeMethods.Gdip.GdipSetStringFormatTrimming(new HandleRef(this, nativeFormat), value); 483int status = SafeNativeMethods.Gdip.GdipSetStringFormatDigitSubstitution(new HandleRef(this, nativeFormat), language, substitute); 499int status = SafeNativeMethods.Gdip.GdipGetStringFormatDigitSubstitution(new HandleRef(this, nativeFormat), out lang, out digitSubstitute); 517int status = SafeNativeMethods.Gdip.GdipGetStringFormatDigitSubstitution(new HandleRef(this, nativeFormat), out language, out digitSubstitute);
commonui\System\Drawing\Advanced\TextureBrush.cs (21)
83int status = SafeNativeMethods.Gdip.GdipCreateTexture(new HandleRef(image, image.nativeImage), 121int status = SafeNativeMethods.Gdip.GdipCreateTexture2(new HandleRef(image, image.nativeImage), 163int status = SafeNativeMethods.Gdip.GdipCreateTexture2I(new HandleRef(image, image.nativeImage), 218int status = SafeNativeMethods.Gdip.GdipCreateTextureIA(new HandleRef(image, image.nativeImage), 219new HandleRef(imageAttr, (imageAttr == null) ? 273int status = SafeNativeMethods.Gdip.GdipCreateTextureIAI(new HandleRef(image, image.nativeImage), 274new HandleRef(imageAttr, (imageAttr == null) ? 307int status = SafeNativeMethods.Gdip.GdipCloneBrush(new HandleRef(this, this.NativeBrush), out cloneBrush); 320int status = SafeNativeMethods.Gdip.GdipSetTextureTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 329int status = SafeNativeMethods.Gdip.GdipGetTextureTransform(new HandleRef(this, this.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix)); 361int status = SafeNativeMethods.Gdip.GdipSetTextureWrapMode(new HandleRef(this, this.NativeBrush), unchecked((int) wrapMode)); 371int status = SafeNativeMethods.Gdip.GdipGetTextureWrapMode(new HandleRef(this, this.NativeBrush), out mode); 414int status = SafeNativeMethods.Gdip.GdipGetTextureImage(new HandleRef(this, this.NativeBrush), out image); 433int status = SafeNativeMethods.Gdip.GdipResetTextureTransform(new HandleRef(this, this.NativeBrush)); 463int status = SafeNativeMethods.Gdip.GdipMultiplyTextureTransform(new HandleRef(this, this.NativeBrush), 464new HandleRef(matrix, matrix.nativeMatrix), 491int status = SafeNativeMethods.Gdip.GdipTranslateTextureTransform(new HandleRef(this, this.NativeBrush), 520int status = SafeNativeMethods.Gdip.GdipScaleTextureTransform(new HandleRef(this, this.NativeBrush), 549int status = SafeNativeMethods.Gdip.GdipRotateTextureTransform(new HandleRef(this, this.NativeBrush),
commonui\System\Drawing\Bitmap.cs (24)
70status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, bitmap)); 73SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, bitmap)); 112status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, bitmap)); 115SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, bitmap)); 144status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, bitmap)); 147SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, bitmap)); 179status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, bitmap)); 182SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, bitmap)); 218status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, bitmap)); 221SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, bitmap)); 244int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(width, height, stride, unchecked((int) format), new HandleRef(null, scan0), out bitmap); 297int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromGraphics(width, height, new HandleRef(g, g.NativeGraphics), out bitmap); 358int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromHICON(new HandleRef(null, hicon), out bitmap); 379int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromResource(new HandleRef(null, hinstance), 380new HandleRef(null, name), 421int status = SafeNativeMethods.Gdip.GdipCreateHBITMAPFromBitmap(new HandleRef(this, nativeImage), out hBitmap, 444int status = SafeNativeMethods.Gdip.GdipCreateHICONFromBitmap(new HandleRef(this, nativeImage), out hIcon); 502new HandleRef(this, nativeImage), 536new HandleRef(this, nativeImage), 647int status = SafeNativeMethods.Gdip.GdipBitmapLockBits(new HandleRef(this, nativeImage), ref gprect, 663int status = SafeNativeMethods.Gdip.GdipBitmapUnlockBits(new HandleRef(this, nativeImage), bitmapdata); 688int status = SafeNativeMethods.Gdip.GdipBitmapGetPixel(new HandleRef(this, nativeImage), x, y, out color); 715int status = SafeNativeMethods.Gdip.GdipBitmapSetPixel(new HandleRef(this, nativeImage), x, y, color.ToArgb()); 727int status = SafeNativeMethods.Gdip.GdipBitmapSetResolution(new HandleRef(this, nativeImage), xDpi, yDpi);
commonui\System\Drawing\Brush.cs (1)
104SafeNativeMethods.Gdip.GdipDeleteBrush(new HandleRef(this, this.nativeBrush));
commonui\System\Drawing\BufferedGraphics.cs (4)
118RenderInternal(new HandleRef(Graphics, targetDC), this); 133RenderInternal(new HandleRef(target, targetDC), this); 148RenderInternal(new HandleRef(null, targetDC), this); 162new HandleRef(buffer.Graphics, sourceDC), 0, 0, rop);
commonui\System\Drawing\BufferedGraphicsContext.cs (17)
253hbm = SafeNativeMethods.CreateCompatibleBitmap(new HandleRef(null, hdc), 1, 1); 265SafeNativeMethods.GetDIBits(new HandleRef(null, hdc), 266new HandleRef(null, hbm), 283SafeNativeMethods.GetDIBits(new HandleRef(null, hdc), 284new HandleRef(null, hbm), 296SafeNativeMethods.DeleteObject(new HandleRef(null, hbm)); 344palRet = SafeNativeMethods.GetPaletteEntries(new HandleRef(null, palHalftone), 0, cColors, aj); 348palRet = SafeNativeMethods.GetPaletteEntries(new HandleRef(null, hpal), 0, cColors, aj); 380compatDC = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, src)); 400oldBitmap = SafeNativeMethods.SelectObject(new HandleRef(this, compatDC), new HandleRef(this, dib)); 450int objType = UnsafeNativeMethods.GetObjectType(new HandleRef(null, hdc)); 489hbmRet = SafeNativeMethods.CreateDIBSection(new HandleRef(null, hdc), ref pbmi, NativeMethods.DIB_RGB_COLORS, ref ppvBits, IntPtr.Zero, 0); 530SafeNativeMethods.SelectObject(new HandleRef(this, compatDC), new HandleRef(this, oldBitmap)); 536UnsafeNativeMethods.DeleteDC(new HandleRef(this, compatDC)); 552SafeNativeMethods.DeleteObject(new HandleRef(this, dib));
commonui\System\Drawing\Graphics.cs (313)
152int status = SafeNativeMethods.Gdip.GdipCreateFromHDC(new HandleRef(null, hdc), out nativeGraphics); 178int status = SafeNativeMethods.Gdip.GdipCreateFromHDC2(new HandleRef(null, hdc), new HandleRef(null, hdevice), out gdipNativeGraphics); 212int status = SafeNativeMethods.Gdip.GdipCreateFromHWND(new HandleRef(null, hwnd), out nativeGraphics); 239int status = SafeNativeMethods.Gdip.GdipGetImageGraphicsContext(new HandleRef(image, image.nativeImage), 286int status = SafeNativeMethods.Gdip.GdipGetDC(new HandleRef(this, this.NativeGraphics), out hdc); 333int status = SafeNativeMethods.Gdip.GdipReleaseDC(new HandleRef(this, this.NativeGraphics), new HandleRef(null, hdc)); 405SafeNativeMethods.Gdip.GdipDeleteGraphics(new HandleRef(this, this.nativeGraphics)); 454int status = SafeNativeMethods.Gdip.GdipFlush(new HandleRef(this, this.NativeGraphics), intention); 480int status = SafeNativeMethods.Gdip.GdipGetCompositingMode(new HandleRef(this, this.NativeGraphics), out mode); 495int status = SafeNativeMethods.Gdip.GdipSetCompositingMode(new HandleRef(this, this.NativeGraphics), unchecked((int)value)); 511int status = SafeNativeMethods.Gdip.GdipGetRenderingOrigin(new HandleRef(this, this.NativeGraphics), out x, out y); 520int status = SafeNativeMethods.Gdip.GdipSetRenderingOrigin(new HandleRef(this, this.NativeGraphics), value.X, value.Y); 536int status = SafeNativeMethods.Gdip.GdipGetCompositingQuality(new HandleRef(this, this.NativeGraphics), out cq); 551int status = SafeNativeMethods.Gdip.GdipSetCompositingQuality(new HandleRef(this, this.NativeGraphics), 572int status = SafeNativeMethods.Gdip.GdipGetTextRenderingHint(new HandleRef(this, this.NativeGraphics), out hint); 587int status = SafeNativeMethods.Gdip.GdipSetTextRenderingHint(new HandleRef(this, this.NativeGraphics), value); 603int status = SafeNativeMethods.Gdip.GdipGetTextContrast(new HandleRef(this, this.NativeGraphics), out tgv); 612int status = SafeNativeMethods.Gdip.GdipSetTextContrast(new HandleRef(this, this.NativeGraphics), value); 628int status = SafeNativeMethods.Gdip.GdipGetSmoothingMode(new HandleRef(this, this.NativeGraphics), out mode); 643int status = SafeNativeMethods.Gdip.GdipSetSmoothingMode(new HandleRef(this, this.NativeGraphics), value); 659int status = SafeNativeMethods.Gdip.GdipGetPixelOffsetMode(new HandleRef(this, this.NativeGraphics), out mode); 674int status = SafeNativeMethods.Gdip.GdipSetPixelOffsetMode(new HandleRef(this, this.NativeGraphics), value); 705int status = SafeNativeMethods.Gdip.GdipGetInterpolationMode(new HandleRef(this, this.NativeGraphics), out mode); 721int status = SafeNativeMethods.Gdip.GdipSetInterpolationMode(new HandleRef(this, this.NativeGraphics), unchecked((int)value)); 741int status = SafeNativeMethods.Gdip.GdipGetWorldTransform(new HandleRef(this, this.NativeGraphics), 742new HandleRef(matrix, matrix.nativeMatrix)); 751int status = SafeNativeMethods.Gdip.GdipSetWorldTransform(new HandleRef(this, this.NativeGraphics), 752new HandleRef(value, value.nativeMatrix)); 772int status = SafeNativeMethods.Gdip.GdipGetPageUnit(new HandleRef(this, this.NativeGraphics), out unit); 787int status = SafeNativeMethods.Gdip.GdipSetPageUnit(new HandleRef(this, this.NativeGraphics), unchecked((int) value)); 802int status = SafeNativeMethods.Gdip.GdipGetPageScale(new HandleRef(this, this.NativeGraphics), scale); 813int status = SafeNativeMethods.Gdip.GdipSetPageScale(new HandleRef(this, this.NativeGraphics), value); 828int status = SafeNativeMethods.Gdip.GdipGetDpiX(new HandleRef(this, this.NativeGraphics), dpi); 845int status = SafeNativeMethods.Gdip.GdipGetDpiY(new HandleRef(this, this.NativeGraphics), dpi); 921HandleRef screenDC = new HandleRef( null, dc.Hdc ); 922HandleRef targetDC = new HandleRef( null, this.GetHdc()); // this DC 951int status = SafeNativeMethods.Gdip.GdipResetWorldTransform(new HandleRef(this, this.NativeGraphics)); 979int status = SafeNativeMethods.Gdip.GdipMultiplyWorldTransform(new HandleRef(this, this.NativeGraphics), 980new HandleRef(matrix, matrix.nativeMatrix), 998int status = SafeNativeMethods.Gdip.GdipTranslateWorldTransform(new HandleRef(this, this.NativeGraphics), dx, dy, order); 1025int status = SafeNativeMethods.Gdip.GdipScaleWorldTransform(new HandleRef(this, this.NativeGraphics), sx, sy, order); 1043int status = SafeNativeMethods.Gdip.GdipRotateWorldTransform(new HandleRef(this, this.NativeGraphics), angle, order); 1066int status = SafeNativeMethods.Gdip.GdipTransformPoints(new HandleRef(this, this.NativeGraphics), unchecked((int)destSpace), 1099int status = SafeNativeMethods.Gdip.GdipTransformPointsI(new HandleRef(this, this.NativeGraphics), unchecked((int)destSpace), 1124int status = SafeNativeMethods.Gdip.GdipGetNearestColor(new HandleRef(this, this.NativeGraphics), ref nearest); 1152int status = SafeNativeMethods.Gdip.GdipDrawLine(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x1, y1, x2, y2); 1184int status = SafeNativeMethods.Gdip.GdipDrawLines(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1185new HandleRef(this, buf), points.Length); 1208int status = SafeNativeMethods.Gdip.GdipDrawLineI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x1, y1, x2, y2); 1240int status = SafeNativeMethods.Gdip.GdipDrawLinesI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1241new HandleRef(this, buf), points.Length); 1263int status = SafeNativeMethods.Gdip.GdipDrawArc(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, 1293int status = SafeNativeMethods.Gdip.GdipDrawArcI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, 1322int status = SafeNativeMethods.Gdip.GdipDrawBezier(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x1, y1, 1356int status = SafeNativeMethods.Gdip.GdipDrawBeziers(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1357new HandleRef(this, buf), points.Length); 1393int status = SafeNativeMethods.Gdip.GdipDrawBeziersI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1394new HandleRef(this, buf), points.Length); 1427int status = SafeNativeMethods.Gdip.GdipDrawRectangle(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, 1446int status = SafeNativeMethods.Gdip.GdipDrawRectangleI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, width, height); 1469int status = SafeNativeMethods.Gdip.GdipDrawRectangles(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1470new HandleRef(this, buf), rects.Length); 1496int status = SafeNativeMethods.Gdip.GdipDrawRectanglesI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1497new HandleRef(this, buf), rects.Length); 1530int status = SafeNativeMethods.Gdip.GdipDrawEllipse(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, 1559int status = SafeNativeMethods.Gdip.GdipDrawEllipseI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, 1591int status = SafeNativeMethods.Gdip.GdipDrawPie(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, width, 1623int status = SafeNativeMethods.Gdip.GdipDrawPieI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), x, y, width, 1644int status = SafeNativeMethods.Gdip.GdipDrawPolygon(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1645new HandleRef(this, buf), points.Length); 1669int status = SafeNativeMethods.Gdip.GdipDrawPolygonI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1670new HandleRef(this, buf), points.Length); 1693int status = SafeNativeMethods.Gdip.GdipDrawPath(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), 1694new HandleRef(path, path.nativePath)); 1716int status = SafeNativeMethods.Gdip.GdipDrawCurve(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1742int status = SafeNativeMethods.Gdip.GdipDrawCurve2(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1777int status = SafeNativeMethods.Gdip.GdipDrawCurve3(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1804int status = SafeNativeMethods.Gdip.GdipDrawCurveI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1829int status = SafeNativeMethods.Gdip.GdipDrawCurve2I(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1855int status = SafeNativeMethods.Gdip.GdipDrawCurve3I(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1883int status = SafeNativeMethods.Gdip.GdipDrawClosedCurve(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1909int status = SafeNativeMethods.Gdip.GdipDrawClosedCurve2(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1935int status = SafeNativeMethods.Gdip.GdipDrawClosedCurveI(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1960int status = SafeNativeMethods.Gdip.GdipDrawClosedCurve2I(new HandleRef(this, this.NativeGraphics), new HandleRef(pen, pen.NativePen), new HandleRef(this, buf), 1977int status = SafeNativeMethods.Gdip.GdipGraphicsClear(new HandleRef(this, this.NativeGraphics), color.ToArgb()); 2007int status = SafeNativeMethods.Gdip.GdipFillRectangle(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, 2036int status = SafeNativeMethods.Gdip.GdipFillRectangleI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, width, height); 2059int status = SafeNativeMethods.Gdip.GdipFillRectangles(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2060new HandleRef(this, buf), rects.Length); 2086int status = SafeNativeMethods.Gdip.GdipFillRectanglesI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2087new HandleRef(this, buf), rects.Length); 2123int status = SafeNativeMethods.Gdip.GdipFillPolygon(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2124new HandleRef(this, buf), points.Length, unchecked((int) fillMode)); 2159int status = SafeNativeMethods.Gdip.GdipFillPolygonI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2160new HandleRef(this, buf), points.Length, unchecked((int) fillMode)); 2193int status = SafeNativeMethods.Gdip.GdipFillEllipse(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, 2222int status = SafeNativeMethods.Gdip.GdipFillEllipseI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, 2255int status = SafeNativeMethods.Gdip.GdipFillPie(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, 2275int status = SafeNativeMethods.Gdip.GdipFillPieI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), x, y, 2294int status = SafeNativeMethods.Gdip.GdipFillPath(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2295new HandleRef(path, path.nativePath)); 2318int status = SafeNativeMethods.Gdip.GdipFillClosedCurve(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2319new HandleRef(this, buf), points.Length); 2352int status = SafeNativeMethods.Gdip.GdipFillClosedCurve2(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2353new HandleRef(this, buf), points.Length, 2379int status = SafeNativeMethods.Gdip.GdipFillClosedCurveI(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2380new HandleRef(this, buf), points.Length); 2410int status = SafeNativeMethods.Gdip.GdipFillClosedCurve2I(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2411new HandleRef(this, buf), points.Length, 2435int status = SafeNativeMethods.Gdip.GdipFillRegion(new HandleRef(this, this.NativeGraphics), new HandleRef(brush, brush.NativeBrush), 2436new HandleRef(region, region.nativeRegion)); 2502int status = SafeNativeMethods.Gdip.GdipDrawString(new HandleRef(this, this.NativeGraphics), s, s.Length, new HandleRef(font, font.NativeFont), ref grf, new HandleRef(format, nativeStringFormat), new HandleRef(brush, brush.NativeBrush)); 2526int status = SafeNativeMethods.Gdip.GdipMeasureString(new HandleRef(this, this.NativeGraphics), text, text.Length, new HandleRef(font, font.NativeFont), ref grfLayout, 2527new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat), 2556int status = SafeNativeMethods.Gdip.GdipMeasureString(new HandleRef(this, this.NativeGraphics), text, text.Length, new HandleRef(font, font.NativeFont), 2558new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat), 2592int status = SafeNativeMethods.Gdip.GdipMeasureString(new HandleRef(this, this.NativeGraphics), text, text.Length, new HandleRef(font, font.NativeFont), 2594new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat), 2641int status = SafeNativeMethods.Gdip.GdipGetStringFormatMeasurableCharacterRangeCount(new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat) 2659status = SafeNativeMethods.Gdip.GdipMeasureCharacterRanges(new HandleRef(this, this.NativeGraphics), text, text.Length, new HandleRef(font, font.NativeFont), ref grf, 2660new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat), 2763int status = SafeNativeMethods.Gdip.GdipDrawImage(new HandleRef(this, this.NativeGraphics), new HandleRef(image, image.nativeImage), 2790int status = SafeNativeMethods.Gdip.GdipDrawImageRect(new HandleRef(this, this.NativeGraphics), 2791new HandleRef(image, image.nativeImage), 2819int status = SafeNativeMethods.Gdip.GdipDrawImageI(new HandleRef(this, this.NativeGraphics), new HandleRef(image, image.nativeImage), 2846int status = SafeNativeMethods.Gdip.GdipDrawImageRectI(new HandleRef(this, this.NativeGraphics), 2847new HandleRef(image, image.nativeImage), 2932int status = SafeNativeMethods.Gdip.GdipDrawImagePoints(new HandleRef(this, this.NativeGraphics), 2933new HandleRef(image, image.nativeImage), 2934new HandleRef(this, buf), count); 2965int status = SafeNativeMethods.Gdip.GdipDrawImagePointsI(new HandleRef(this, this.NativeGraphics), 2966new HandleRef(image, image.nativeImage), 2967new HandleRef(this, buf), count); 2996new HandleRef(this, this.NativeGraphics), 2997new HandleRef(image, image.nativeImage), 3024new HandleRef(this, this.NativeGraphics), 3025new HandleRef(image, image.nativeImage), 3052new HandleRef(this, this.NativeGraphics), 3053new HandleRef(image, image.nativeImage), 3086new HandleRef(this, this.NativeGraphics), 3087new HandleRef(image, image.nativeImage), 3126new HandleRef(this, this.NativeGraphics), 3127new HandleRef(image, image.nativeImage), 3128new HandleRef(this, buf), 3184new HandleRef(this, this.NativeGraphics), 3185new HandleRef(image, image.nativeImage), 3186new HandleRef(this, buf), 3193new HandleRef(imageAttr, (imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero)), 3195new HandleRef(null, (IntPtr)callbackData)); 3250new HandleRef(this, this.NativeGraphics), 3251new HandleRef(image, image.nativeImage), 3252new HandleRef(this, buf), 3259new HandleRef(imageAttr, (imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero)), 3261new HandleRef(null, (IntPtr)callbackData)); 3308new HandleRef(this, this.NativeGraphics), 3309new HandleRef(image, image.nativeImage), 3319new HandleRef(imageAttrs, (imageAttrs != null ? imageAttrs.nativeImageAttributes : IntPtr.Zero)), 3321new HandleRef(null, callbackData)); 3363new HandleRef(this, this.NativeGraphics), 3364new HandleRef(image, image.nativeImage), 3374new HandleRef(imageAttrs, (imageAttrs != null ? imageAttrs.nativeImageAttributes : IntPtr.Zero)), 3376new HandleRef(null, callbackData)); 3408int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPoint(new HandleRef(this, this.NativeGraphics), 3409new HandleRef(metafile, mf), 3412new HandleRef(null, callbackData), 3413new HandleRef(imageAttr, ia)); 3443int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPointI(new HandleRef(this, this.NativeGraphics), 3444new HandleRef(metafile, mf), 3447new HandleRef(null, callbackData), 3448new HandleRef(imageAttr, ia)); 3481new HandleRef(this, this.NativeGraphics), 3482new HandleRef(metafile, mf), 3485new HandleRef(null, callbackData), 3486new HandleRef(imageAttr, ia)); 3517int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestRectI(new HandleRef(this, this.NativeGraphics), 3518new HandleRef(metafile, mf), 3521new HandleRef(null, callbackData), 3522new HandleRef(imageAttr, ia)); 3560int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPoints(new HandleRef(this, this.NativeGraphics), 3561new HandleRef(metafile, mf), 3565new HandleRef(null, callbackData), 3566new HandleRef(imageAttr, ia)); 3606int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileDestPointsI(new HandleRef(this, this.NativeGraphics), 3607new HandleRef(metafile, mf), 3611new HandleRef(null, callbackData), 3612new HandleRef(imageAttr, ia)); 3648int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPoint(new HandleRef(this, this.NativeGraphics), 3649new HandleRef(metafile, mf), 3654new HandleRef(null, callbackData), 3655new HandleRef(imageAttr, ia)); 3691int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPointI(new HandleRef(this, this.NativeGraphics), 3692new HandleRef(metafile, mf), 3697new HandleRef(null, callbackData), 3698new HandleRef(imageAttr, ia)); 3735new HandleRef(this, this.NativeGraphics), 3736new HandleRef(metafile, mf), 3741new HandleRef(null, callbackData), 3742new HandleRef(imageAttr, ia)); 3781int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestRectI(new HandleRef(this, this.NativeGraphics), 3782new HandleRef(metafile, mf), 3787new HandleRef(null, callbackData), 3788new HandleRef(imageAttr, ia)); 3840int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPoints(new HandleRef(this, this.NativeGraphics), 3841new HandleRef(metafile, mf), 3847new HandleRef(null, callbackData), 3848new HandleRef(imageAttr, ia)); 3902int status = SafeNativeMethods.Gdip.GdipEnumerateMetafileSrcRectDestPointsI(new HandleRef(this, this.NativeGraphics), 3903new HandleRef(metafile, mf), 3909new HandleRef(null, callbackData), 3910new HandleRef(imageAttr, ia)); 3940int status = SafeNativeMethods.Gdip.GdipSetClipGraphics(new HandleRef(this, this.NativeGraphics), new HandleRef(g, g.NativeGraphics), combineMode); 3958int status = SafeNativeMethods.Gdip.GdipSetClipRectI(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 3977int status = SafeNativeMethods.Gdip.GdipSetClipRect(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 3999int status = SafeNativeMethods.Gdip.GdipSetClipPath(new HandleRef(this, this.NativeGraphics), new HandleRef(path, path.nativePath), combineMode); 4014int status = SafeNativeMethods.Gdip.GdipSetClipRegion(new HandleRef(this, this.NativeGraphics), new HandleRef(region, region.nativeRegion), combineMode); 4025int status = SafeNativeMethods.Gdip.GdipSetClipRectI(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 4037int status = SafeNativeMethods.Gdip.GdipSetClipRect(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 4052int status = SafeNativeMethods.Gdip.GdipSetClipRegion(new HandleRef(this, this.NativeGraphics), new HandleRef(region, region.nativeRegion), 4064int status = SafeNativeMethods.Gdip.GdipSetClipRectI(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 4079int status = SafeNativeMethods.Gdip.GdipSetClipRegion(new HandleRef(this, this.NativeGraphics), 4080new HandleRef(region, region.nativeRegion), 4092int status = SafeNativeMethods.Gdip.GdipResetClip(new HandleRef(this, this.NativeGraphics)); 4103int status = SafeNativeMethods.Gdip.GdipTranslateClip(new HandleRef(this, this.NativeGraphics), dx, dy); 4114int status = SafeNativeMethods.Gdip.GdipTranslateClip(new HandleRef(this, this.NativeGraphics), dx, dy); 4203int status = SafeNativeMethods.Gdip.GdipGetClip(new HandleRef(this, this.NativeGraphics), new HandleRef(region, region.nativeRegion)); 4223int status = SafeNativeMethods.Gdip.GdipGetClipBounds(new HandleRef(this, this.NativeGraphics), ref rect); 4240int status = SafeNativeMethods.Gdip.GdipIsClipEmpty(new HandleRef(this, this.NativeGraphics), out isEmpty); 4267int status = SafeNativeMethods.Gdip.GdipGetVisibleClipBounds(new HandleRef(this, this.NativeGraphics), ref rect); 4287int status = SafeNativeMethods.Gdip.GdipIsVisibleClipEmpty(new HandleRef(this, this.NativeGraphics), out isEmpty); 4311int status = SafeNativeMethods.Gdip.GdipIsVisiblePointI(new HandleRef(this, this.NativeGraphics), point.X, point.Y, out isVisible); 4333int status = SafeNativeMethods.Gdip.GdipIsVisiblePoint(new HandleRef(this, this.NativeGraphics), point.X, point.Y, out isVisible); 4355int status = SafeNativeMethods.Gdip.GdipIsVisibleRectI(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 4378int status = SafeNativeMethods.Gdip.GdipIsVisibleRect(new HandleRef(this, this.NativeGraphics), rect.X, rect.Y, 4433int status = SafeNativeMethods.Gdip.GdipSaveGraphics(new HandleRef(this, this.NativeGraphics), out state); 4451int status = SafeNativeMethods.Gdip.GdipRestoreGraphics(new HandleRef(this, this.NativeGraphics), gstate.nativeState); 4477int status = SafeNativeMethods.Gdip.GdipBeginContainer(new HandleRef(this, this.NativeGraphics), ref dstf, 4500int status = SafeNativeMethods.Gdip.GdipBeginContainer2(new HandleRef(this, this.NativeGraphics), out state); 4521int status = SafeNativeMethods.Gdip.GdipEndContainer(new HandleRef(this, this.NativeGraphics), container.nativeGraphicsContainer); 4543int status = SafeNativeMethods.Gdip.GdipBeginContainerI(new HandleRef(this, this.NativeGraphics), ref gpDest, 4565int status = SafeNativeMethods.Gdip.GdipComment(new HandleRef(this, this.NativeGraphics), data.Length, data); 4597SafeNativeMethods.IntDeleteObject(new HandleRef(null, halftonePalette));
commonui\System\Drawing\Icon.cs (19)
144handle = SafeNativeMethods.CopyImage(new HandleRef(original, original.Handle), SafeNativeMethods.IMAGE_ICON, iconSize.Width, iconSize.Height, 0); 327SafeNativeMethods.GetIconInfo(new HandleRef(this, Handle), info); 331SafeNativeMethods.GetObject(new HandleRef(null, info.hbmColor), Marshal.SizeOf(typeof(SafeNativeMethods.BITMAP)), bmp); 332SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmColor)); 336SafeNativeMethods.GetObject(new HandleRef(null, info.hbmMask), Marshal.SizeOf(typeof(SafeNativeMethods.BITMAP)), bmp); 341SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmMask)); 383SafeNativeMethods.DestroyIcon(new HandleRef(this, handle)); 475SafeNativeMethods.IntersectClipRect(new HandleRef(this, dc), targetX, targetY, targetX+clipWidth, targetY+clipHeight); 476SafeNativeMethods.DrawIconEx(new HandleRef(null, dc), 479new HandleRef(this, handle), 629bitDepth = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), SafeNativeMethods.BITSPIXEL); 630bitDepth *= UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), SafeNativeMethods.PLANES); 631UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc)); 916UnsafeNativeMethods.CopyMemory(new HandleRef(this, destPtr), new HandleRef(this, srcPtr), Math.Abs(targetData.Stride)); 1001SafeNativeMethods.GetIconInfo(new HandleRef(this, handle), info); 1005SafeNativeMethods.GetObject(new HandleRef(null, info.hbmColor), Marshal.SizeOf(typeof(SafeNativeMethods.BITMAP)), bmp); 1049SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmColor)); 1051SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmMask));
commonui\System\Drawing\Image.cs (52)
201status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, image)); 204SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, image)); 273status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, image)); 276SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, image)); 299status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, image)); 302SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, image)); 310status = SafeNativeMethods.Gdip.GdipGetImageType(new HandleRef(this, nativeImage), out type); 334int status = SafeNativeMethods.Gdip.GdipCloneImage(new HandleRef(this, nativeImage), out cloneImage); 339status = SafeNativeMethods.Gdip.GdipImageForceValidation(new HandleRef(null, cloneImage)); 342SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(null, cloneImage)); 373SafeNativeMethods.Gdip.GdipDisposeImage(new HandleRef(this, nativeImage)); 488int status = SafeNativeMethods.Gdip.GdipGetImageType(new HandleRef(null, nativeImage), out type); 532int status = SafeNativeMethods.Gdip.GdipGetEncoderParameterListSize(new HandleRef(this, nativeImage), 543status = SafeNativeMethods.Gdip.GdipGetEncoderParameterList(new HandleRef(this, nativeImage), 628status = SafeNativeMethods.Gdip.GdipSaveImageToFile(new HandleRef(this, nativeImage), 631new HandleRef(encoderParams, encoderParamsMemory)); 716status = SafeNativeMethods.Gdip.GdipSaveImageToStream(new HandleRef(this, nativeImage), 719new HandleRef(encoderParams, encoderParamsMemory)); 748int status = SafeNativeMethods.Gdip.GdipSaveAdd(new HandleRef(this, nativeImage), new HandleRef(encoderParams, encoder)); 777int status = SafeNativeMethods.Gdip.GdipSaveAddImage(new HandleRef(this, nativeImage), new HandleRef(image, image.nativeImage), new HandleRef(encoderParams, encoder)); 794int status = SafeNativeMethods.Gdip.GdipGetImageDimension(new HandleRef(this, nativeImage), out width, out height); 838int status = SafeNativeMethods.Gdip.GdipGetImageWidth(new HandleRef(this, nativeImage), out width); 860int status = SafeNativeMethods.Gdip.GdipGetImageHeight(new HandleRef(this, nativeImage), out height); 878int status = SafeNativeMethods.Gdip.GdipGetImageHorizontalResolution(new HandleRef(this, nativeImage), out horzRes); 896int status = SafeNativeMethods.Gdip.GdipGetImageVerticalResolution(new HandleRef(this, nativeImage), out vertRes); 914int status = SafeNativeMethods.Gdip.GdipGetImageFlags(new HandleRef(this, nativeImage), out flags); 931int status = SafeNativeMethods.Gdip.GdipGetImageRawFormat(new HandleRef(this, nativeImage), ref guid); 949int status = SafeNativeMethods.Gdip.GdipGetImagePixelFormat(new HandleRef(this, nativeImage), out format); 967int status = SafeNativeMethods.Gdip.GdipGetImageBounds(new HandleRef(this, nativeImage), ref gprectf, out pageUnit); 978int status = SafeNativeMethods.Gdip.GdipGetImagePaletteSize(new HandleRef(this, nativeImage), out size); 995status = SafeNativeMethods.Gdip.GdipGetImagePalette(new HandleRef(this, nativeImage), memory, size); 1014int status = SafeNativeMethods.Gdip.GdipSetImagePalette(new HandleRef(this, nativeImage), memory); 1050int status = SafeNativeMethods.Gdip.GdipGetImageThumbnail(new HandleRef(this, nativeImage), thumbWidth, thumbHeight, out thumbImage, 1073int status = SafeNativeMethods.Gdip.GdipImageGetFrameDimensionsCount(new HandleRef(this, nativeImage), out count); 1091status = SafeNativeMethods.Gdip.GdipImageGetFrameDimensionsList(new HandleRef(this, nativeImage), buffer, count); 1124int status = SafeNativeMethods.Gdip.GdipImageGetFrameCount(new HandleRef(this, nativeImage), ref dimensionID, count); 1143int status = SafeNativeMethods.Gdip.GdipImageSelectActiveFrame(new HandleRef(this, nativeImage), ref dimensionID, frameIndex); 1158int status = SafeNativeMethods.Gdip.GdipImageRotateFlip(new HandleRef(this, nativeImage), unchecked((int) rotateFlipType)); 1176int status = SafeNativeMethods.Gdip.GdipGetPropertyCount(new HandleRef(this, nativeImage), out count); 1187status = SafeNativeMethods.Gdip.GdipGetPropertyIdList(new HandleRef(this, nativeImage), count, propid); 1205int status = SafeNativeMethods.Gdip.GdipGetPropertyItemSize(new HandleRef(this, nativeImage), propid, out size); 1218status = SafeNativeMethods.Gdip.GdipGetPropertyItem(new HandleRef(this, nativeImage), propid, size, propdata); 1240int status = SafeNativeMethods.Gdip.GdipRemovePropertyItem(new HandleRef(this, nativeImage), propid); 1256int status = SafeNativeMethods.Gdip.GdipSetPropertyItem(new HandleRef(this, nativeImage), propItemInternal); 1273int status = SafeNativeMethods.Gdip.GdipGetPropertyCount(new HandleRef(this, nativeImage), out count); 1278status = SafeNativeMethods.Gdip.GdipGetPropertySize(new HandleRef(this, nativeImage), out size, ref count); 1288status = SafeNativeMethods.Gdip.GdipGetAllPropertyItems(new HandleRef(this, nativeImage), size, count, propdata); 1340int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromHBITMAP(new HandleRef(null, hbitmap), new HandleRef(null, hpalette), out bitmap);
commonui\System\Drawing\NativeMethods.cs (1)
19internal static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero);
commonui\System\Drawing\Pen.cs (52)
120int status = SafeNativeMethods.Gdip.GdipCreatePen2(new HandleRef(brush, brush.NativeBrush), 166int status = SafeNativeMethods.Gdip.GdipClonePen(new HandleRef(this, this.NativePen), out clonePen); 213SafeNativeMethods.Gdip.GdipDeletePen(new HandleRef(this, this.NativePen)); 252int status = SafeNativeMethods.Gdip.GdipGetPenWidth(new HandleRef(this, this.NativePen), width); 265int status = SafeNativeMethods.Gdip.GdipSetPenWidth(new HandleRef(this, this.NativePen), value); 285int status = SafeNativeMethods.Gdip.GdipSetPenLineCap197819(new HandleRef(this, this.NativePen), 303int status = SafeNativeMethods.Gdip.GdipGetPenStartCap(new HandleRef(this, this.NativePen), out startCap); 331int status = SafeNativeMethods.Gdip.GdipSetPenStartCap(new HandleRef(this, this.NativePen), unchecked((int)value)); 349int status = SafeNativeMethods.Gdip.GdipGetPenEndCap(new HandleRef(this, this.NativePen), out endCap); 378int status = SafeNativeMethods.Gdip.GdipSetPenEndCap(new HandleRef(this, this.NativePen), unchecked((int)value)); 394int status = SafeNativeMethods.Gdip.GdipGetPenDashCap197819(new HandleRef(this, this.NativePen), out dashCap); 415int status = SafeNativeMethods.Gdip.GdipSetPenDashCap197819(new HandleRef(this, this.NativePen), unchecked((int)value)); 434int status = SafeNativeMethods.Gdip.GdipGetPenLineJoin(new HandleRef(this, this.NativePen), out lineJoin); 452int status = SafeNativeMethods.Gdip.GdipSetPenLineJoin(new HandleRef(this, this.NativePen), unchecked((int)value)); 473int status = SafeNativeMethods.Gdip.GdipGetPenCustomStartCap(new HandleRef(this, this.NativePen), out lineCap); 485int status = SafeNativeMethods.Gdip.GdipSetPenCustomStartCap(new HandleRef(this, this.NativePen), 486new HandleRef(value, (value == null) ? IntPtr.Zero : value.nativeCap)); 507int status = SafeNativeMethods.Gdip.GdipGetPenCustomEndCap(new HandleRef(this, this.NativePen), out lineCap); 519int status = SafeNativeMethods.Gdip.GdipSetPenCustomEndCap(new HandleRef(this, this.NativePen), 520new HandleRef(value, (value == null) ? IntPtr.Zero : value.nativeCap)); 536int status = SafeNativeMethods.Gdip.GdipGetPenMiterLimit(new HandleRef(this, this.NativePen), miterLimit); 548int status = SafeNativeMethods.Gdip.GdipSetPenMiterLimit(new HandleRef(this, this.NativePen), value); 570int status = SafeNativeMethods.Gdip.GdipGetPenMode(new HandleRef(this, this.NativePen), out penMode); 588int status = SafeNativeMethods.Gdip.GdipSetPenMode(new HandleRef(this, this.NativePen), value); 610int status = SafeNativeMethods.Gdip.GdipGetPenTransform(new HandleRef(this, this.NativePen), new HandleRef(matrix, matrix.nativeMatrix)); 626int status = SafeNativeMethods.Gdip.GdipSetPenTransform(new HandleRef(this, this.NativePen), new HandleRef(value, value.nativeMatrix)); 640int status = SafeNativeMethods.Gdip.GdipResetPenTransform(new HandleRef(this, this.NativePen)); 667int status = SafeNativeMethods.Gdip.GdipMultiplyPenTransform(new HandleRef(this, this.NativePen), 668new HandleRef(matrix, matrix.nativeMatrix), 693int status = SafeNativeMethods.Gdip.GdipTranslatePenTransform(new HandleRef(this, this.NativePen), 717int status = SafeNativeMethods.Gdip.GdipScalePenTransform(new HandleRef(this, this.NativePen), 741int status = SafeNativeMethods.Gdip.GdipRotatePenTransform(new HandleRef(this, this.NativePen), 756int status = SafeNativeMethods.Gdip.GdipSetPenColor(new HandleRef(this, this.NativePen), 774int status = SafeNativeMethods.Gdip.GdipGetPenFillType(new HandleRef(this, this.NativePen), out type); 793int status = SafeNativeMethods.Gdip.GdipGetPenColor(new HandleRef(this, this.NativePen), out colorARGB); 867int status = SafeNativeMethods.Gdip.GdipSetPenBrushFill(new HandleRef(this, this.NativePen), 868new HandleRef(value, value.NativeBrush)); 879int status = SafeNativeMethods.Gdip.GdipGetPenBrushFill(new HandleRef(this, this.NativePen), out nativeBrush); 900int status = SafeNativeMethods.Gdip.GdipGetPenDashStyle(new HandleRef(this, this.NativePen), out dashstyle); 919int status = SafeNativeMethods.Gdip.GdipSetPenDashStyle(new HandleRef(this, this.NativePen), unchecked((int)value)); 941int status = SafeNativeMethods.Gdip.GdipGetPenDashCount(new HandleRef(this, this.NativePen), out retval); 962int status = SafeNativeMethods.Gdip.GdipGetPenDashOffset(new HandleRef(this, this.NativePen), dashoffset); 973int status = SafeNativeMethods.Gdip.GdipSetPenDashOffset(new HandleRef(this, this.NativePen), value); 995int status = SafeNativeMethods.Gdip.GdipGetPenDashCount(new HandleRef(this, this.NativePen), out retval); 1006status = SafeNativeMethods.Gdip.GdipGetPenDashArray(new HandleRef(this, this.NativePen), buf, count); 1041int status = SafeNativeMethods.Gdip.GdipSetPenDashArray(new HandleRef(this, this.NativePen), new HandleRef(buf, buf), count); 1063int status = SafeNativeMethods.Gdip.GdipGetPenCompoundCount(new HandleRef(this, this.NativePen), out count); 1070status = SafeNativeMethods.Gdip.GdipGetPenCompoundArray(new HandleRef(this, this.NativePen), array, count); 1080int status = SafeNativeMethods.Gdip.GdipSetPenCompoundArray(new HandleRef(this, this.NativePen), value, value.Length);
commonui\System\Drawing\Printing\DefaultPrintController.cs (13)
70int result = SafeNativeMethods.StartDoc(new HandleRef(this.dc, dc.Hdc), info); 102IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 104IntPtr result = SafeNativeMethods.ResetDC(new HandleRef(this.dc, dc.Hdc), new HandleRef(null, modePointer)); 108SafeNativeMethods.GlobalUnlock(new HandleRef(this, modeHandle)); 125int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 126int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 127int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 128int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(this.dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY); 137int result2 = SafeNativeMethods.StartPage(new HandleRef(this.dc, dc.Hdc)); 160int result = SafeNativeMethods.EndPage(new HandleRef(this.dc, dc.Hdc)); 191int result = (e.Cancel) ? SafeNativeMethods.AbortDoc(new HandleRef(dc, dc.Hdc)) : SafeNativeMethods.EndDoc(new HandleRef(dc, dc.Hdc));
commonui\System\Drawing\Printing\PageSettings.cs (23)
73SafeNativeMethods.GlobalFree(new HandleRef(this, modeHandle)); 113int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 114int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 143int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 144int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY); 211IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 216SafeNativeMethods.GlobalUnlock(new HandleRef(this, modeHandle)); 217SafeNativeMethods.GlobalFree(new HandleRef(this, modeHandle)); 239HandleRef hdc = new HandleRef(dc, dc.Hdc); 283IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 288SafeNativeMethods.GlobalUnlock(new HandleRef(this, modeHandle)); 289SafeNativeMethods.GlobalFree(new HandleRef(this, modeHandle)); 338IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 421SafeNativeMethods.GlobalFree(new HandleRef(null, modePointer)); 425SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevmode)); 431IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 436SafeNativeMethods.GlobalUnlock(new HandleRef(this, modeHandle)); 437SafeNativeMethods.GlobalFree(new HandleRef(this, modeHandle)); 473IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, modeHandle)); 478SafeNativeMethods.GlobalUnlock(new HandleRef(null, modeHandle)); 481SafeNativeMethods.GlobalFree(new HandleRef(null, modeHandle)); 557IntPtr pointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 574SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevmode));
commonui\System\Drawing\Printing\PreviewPrintController.cs (4)
134int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 135int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 136int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 137int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
commonui\System\Drawing\Printing\PrintController.cs (1)
60SafeNativeMethods.GlobalFree(new HandleRef(this, handle));
commonui\System\Drawing\Printing\PrinterSettings.cs (40)
532HandleRef hdc = new HandleRef(dc, dc.Hdc); 575HandleRef hdc = new HandleRef(dc, dc.Hdc); 659SafeNativeMethods.GlobalFree(new HandleRef(null, modeHandle)); 667IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 668DeviceContext dc = DeviceContext.CreateDC(DriverName, PrinterNameInternal, (string) null, new HandleRef(null, modePointer)); 669SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevmode)); 696SafeNativeMethods.GlobalFree(new HandleRef(null, modeHandle)); 705IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 706DeviceContext dc = DeviceContext.CreateIC(DriverName, PrinterNameInternal, (string) null, new HandleRef(null, modePointer)); 707SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevmode)); 863IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 868SafeNativeMethods.GlobalUnlock(new HandleRef(data, handle)); 872SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 873SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 886IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 891SafeNativeMethods.GlobalUnlock(new HandleRef(data, handle)); 895SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 896SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 918IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 924SafeNativeMethods.GlobalUnlock(new HandleRef(data, handle)); 928SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 929SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 942IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 948SafeNativeMethods.GlobalUnlock(new HandleRef(data, handle)); 952SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 953SafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 967result = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), capability); 1011IntPtr pointer = SafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1055SafeNativeMethods.GlobalFree(new HandleRef(null, handle)); 1056SafeNativeMethods.GlobalUnlock(new HandleRef(null, handle)); 1061SafeNativeMethods.GlobalUnlock(new HandleRef(null, handle)); 1111IntPtr namesPointer = SafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1121SafeNativeMethods.GlobalUnlock(new HandleRef(null, handle)); 1147IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 1167SafeNativeMethods.GlobalUnlock(new HandleRef(this, modeHandle)); 1172SafeNativeMethods.GlobalFree(new HandleRef(this, modeHandle)); 1318IntPtr pointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 1347SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevmode)); 1362IntPtr namesPointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevnames)); 1370SafeNativeMethods.GlobalUnlock(new HandleRef(null, hdevnames));
commonui\System\Drawing\Printing\PrintPreviewGraphics.cs (4)
55int dpiX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSX); 56int dpiY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.LOGPIXELSY); 57int hardMarginX_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETX); 58int hardMarginY_DU = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(dc, dc.Hdc), SafeNativeMethods.PHYSICALOFFSETY);
commonui\System\Drawing\Region.cs (66)
114int status = SafeNativeMethods.Gdip.GdipCreateRegionPath(new HandleRef(path, path.nativePath), out region); 160int status = SafeNativeMethods.Gdip.GdipCreateRegionHrgn(new HandleRef(null, hrgn), out region); 187int status = SafeNativeMethods.Gdip.GdipCloneRegion(new HandleRef(this, nativeRegion), out region); 219SafeNativeMethods.Gdip.GdipDeleteRegion(new HandleRef(this, nativeRegion)); 256int status = SafeNativeMethods.Gdip.GdipSetInfinite(new HandleRef(this, nativeRegion)); 268int status = SafeNativeMethods.Gdip.GdipSetEmpty(new HandleRef(this, nativeRegion)); 282int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Intersect); 298int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new HandleRef(this, nativeRegion), ref gprect, CombineMode.Intersect); 315int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), CombineMode.Intersect); 332int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), CombineMode.Intersect); 349SafeNativeMethods.IntDeleteObject(new HandleRef(this, regionHandle)); 362int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Union); 376int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new HandleRef(this, nativeRegion), ref gprect, CombineMode.Union); 391int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), CombineMode.Union); 407int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), CombineMode.Union); 421int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Xor); 435int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new HandleRef(this, nativeRegion), ref gprect, CombineMode.Xor); 450int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), CombineMode.Xor); 465int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), CombineMode.Xor); 479int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Exclude); 493int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new HandleRef(this, nativeRegion), ref gprect, CombineMode.Exclude); 508int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), 524int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), 539int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Complement); 553int status = SafeNativeMethods.Gdip.GdipCombineRegionRectI(new HandleRef(this, nativeRegion), ref gprect, CombineMode.Complement); 569int status = SafeNativeMethods.Gdip.GdipCombineRegionPath(new HandleRef(this, nativeRegion), new HandleRef(path, path.nativePath), CombineMode.Complement); 586int status = SafeNativeMethods.Gdip.GdipCombineRegionRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), CombineMode.Complement); 601int status = SafeNativeMethods.Gdip.GdipTranslateRegion(new HandleRef(this, nativeRegion), dx, dy); 613int status = SafeNativeMethods.Gdip.GdipTranslateRegionI(new HandleRef(this, nativeRegion), dx, dy); 628int status = SafeNativeMethods.Gdip.GdipTransformRegion(new HandleRef(this, nativeRegion), 629new HandleRef(matrix, matrix.nativeMatrix)); 649int status = SafeNativeMethods.Gdip.GdipGetRegionBounds(new HandleRef(this, nativeRegion), new HandleRef(g, g.NativeGraphics), ref gprectf); 672int status = SafeNativeMethods.Gdip.GdipGetRegionHRgn(new HandleRef(this, nativeRegion), new HandleRef(g, g.NativeGraphics), out hrgn); 692int status = SafeNativeMethods.Gdip.GdipIsEmptyRegion(new HandleRef(this, nativeRegion), new HandleRef(g, g.NativeGraphics), out isEmpty); 712int status = SafeNativeMethods.Gdip.GdipIsInfiniteRegion(new HandleRef(this, nativeRegion), new HandleRef(g, g.NativeGraphics), out isInfinite); 736int status = SafeNativeMethods.Gdip.GdipIsEqualRegion(new HandleRef(this, nativeRegion), new HandleRef(region, region.nativeRegion), new HandleRef(g, g.NativeGraphics), out isEqual); 753int status = SafeNativeMethods.Gdip.GdipGetRegionDataSize(new HandleRef(this, nativeRegion), out regionSize); 763status = SafeNativeMethods.Gdip.GdipGetRegionData(new HandleRef(this, nativeRegion), regionData, regionSize, out regionSize); 817int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionPoint(new HandleRef(this, nativeRegion), point.X, point.Y, 818new HandleRef(g, (g==null) ? IntPtr.Zero : g.NativeGraphics), 869int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionRect(new HandleRef(this, nativeRegion), rect.X, rect.Y, 871new HandleRef(g, (g==null) ? IntPtr.Zero : g.NativeGraphics), 912int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionPointI(new HandleRef(this, nativeRegion), point.X, point.Y, 913new HandleRef(g, (g == null) ? IntPtr.Zero : g.NativeGraphics), 966int status = SafeNativeMethods.Gdip.GdipIsVisibleRegionRectI(new HandleRef(this, nativeRegion), rect.X, rect.Y, 968new HandleRef(g, (g == null) ? IntPtr.Zero : g.NativeGraphics), 993int status = SafeNativeMethods.Gdip.GdipGetRegionScansCount(new HandleRef(this, nativeRegion), 995new HandleRef(matrix, matrix.nativeMatrix)); 1005status = SafeNativeMethods.Gdip.GdipGetRegionScans(new HandleRef(this, nativeRegion), 1008new HandleRef(matrix, matrix.nativeMatrix));
commonui\System\Drawing\SolidBrush.cs (3)
81int status = SafeNativeMethods.Gdip.GdipCloneBrush(new HandleRef(this, this.NativeBrush), out cloneBrush); 116int status = SafeNativeMethods.Gdip.GdipGetSolidFillColor(new HandleRef(this, this.NativeBrush), out colorARGB); 152int status = SafeNativeMethods.Gdip.GdipSetSolidFillColor(new HandleRef(this, this.NativeBrush), value.ToArgb());
misc\DbgUtil.cs (2)
241new HandleRef(null, IntPtr.Zero), 246new HandleRef(null, IntPtr.Zero) );
misc\DpiHelper.cs (2)
111deviceDpi = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), CAPS.LOGPIXELSX); 113UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC));
misc\GDI\DeviceContext.cs (27)
181hCurrentPen = hInitialPen = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_PEN); 182hCurrentBrush = hInitialBrush = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_BRUSH); 183hCurrentBmp = hInitialBmp = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_BITMAP); 184hCurrentFont = hInitialFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_FONT); 194IntPtr currentPen = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialPen)); 202IntPtr currentBrush = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBrush)); 210IntPtr currentBmp = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBmp)); 218IntUnsafeNativeMethods.DeleteObject(new HandleRef(this, handleToDelete)); 257this.hWnd = IntUnsafeNativeMethods.WindowFromDC( new HandleRef( this, this.hDC) ); 310IntPtr compatibleDc = IntUnsafeNativeMethods.CreateCompatibleDC( new HandleRef(null, hdc) ); 386IntUnsafeNativeMethods.DeleteHDC(new HandleRef(this, this.hDC)); 398IntUnsafeNativeMethods.DeleteDC(new HandleRef(this, this.hDC)); 437this.hDC = IntUnsafeNativeMethods.GetDC(new HandleRef(this, this.hWnd)); 459IntUnsafeNativeMethods.ReleaseDC(new HandleRef(this, this.hWnd), new HandleRef(this, this.hDC)); 479return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.GetGraphicsMode( new HandleRef( this, this.Hdc ) ); 496return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.SetGraphicsMode( new HandleRef( this, this.Hdc ), unchecked((int) newMode)); 516IntUnsafeNativeMethods.RestoreDC(new HandleRef(this, this.hDC), -1); 567HandleRef hdc = new HandleRef( this, this.Hdc); 605HandleRef hdc = new HandleRef(this, this.Hdc); 606HandleRef hRegion = new HandleRef(region, region.HRegion); 626int result = IntUnsafeNativeMethods.GetClipRgn(new HandleRef( this, this.Hdc), new HandleRef(clip, clip.HRegion)); 649IntUnsafeNativeMethods.OffsetViewportOrgEx( new HandleRef( this, this.Hdc ), dx, dy, orgn );
misc\GDI\WindowsRegion.cs (5)
126return IntUnsafeNativeMethods.CombineRgn(new HandleRef(this, this.HRegion), new HandleRef(region1, region1.HRegion), new HandleRef(region2, region2.HRegion), mode); 152IntUnsafeNativeMethods.DeleteObject(new HandleRef(this, this.nativeHandle)); 195IntUnsafeNativeMethods.GetRgnBox(new HandleRef(this, this.nativeHandle), ref rect);
System.IdentityModel.Selectors (1)
infocard\Diagnostics\Managed\Microsoft\InfoCards\Diagnostics\InfocardTrace.cs (1)
510HandleRef data = new HandleRef(handle, stringsRootHandle.AddrOfPinnedObject());
System.ServiceModel.Internals (1)
System\Runtime\Diagnostics\EventLogger.cs (1)
307HandleRef data = new HandleRef(handle, stringsRootHandle.AddrOfPinnedObject());
System.Web (17)
Compilation\CompilationLock.cs (2)
66_mutexHandle = new HandleRef(this, UnsafeNativeMethods.InstrumentedMutexCreate(_name)); 93_mutexHandle = new HandleRef(this, IntPtr.Zero);
FileChangesMonitor.cs (2)
452_ndirMonCompletionHandle = new HandleRef(this, _ndirMonCompletionPtr); 488_ndirMonCompletionHandle = new HandleRef(this, IntPtr.Zero);
ImpersonationContext.cs (6)
26ImpersonateToken(new HandleRef(this, token)); 43_savedToken = new HandleRef(this, IntPtr.Zero); 52_savedToken = new HandleRef(this, GetCurrentToken()); 144ImpersonateToken(new HandleRef(this, IntPtr.Zero)); 150ImpersonateToken(new HandleRef(this, HostingEnvironment.ApplicationIdentityToken)); 185ImpersonateToken(new HandleRef(this, token));
State\OutOfProcStateClientManager.cs (7)
292socketHandle = new HandleRef(this, conn._socketHandle.Handle); 295socketHandle = new HandleRef(this, INVALID_SOCKET); 346conn._socketHandle = new HandleRef(this, results.socket); 510UnsafeNativeMethods.SessionNDFreeBody(new HandleRef(this, results.content)); 697_socketHandle = new HandleRef(this, socket); 715_socketHandle = new HandleRef(this, OutOfProcSessionStateStore.INVALID_SOCKET); 721_socketHandle = new HandleRef(this, OutOfProcSessionStateStore.INVALID_SOCKET);
System.Windows.Forms (1475)
misc\DbgUtil.cs (2)
241new HandleRef(null, IntPtr.Zero), 246new HandleRef(null, IntPtr.Zero) );
misc\DpiHelper.cs (2)
111deviceDpi = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), CAPS.LOGPIXELSX); 113UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC));
misc\GDI\DeviceContext.cs (27)
181hCurrentPen = hInitialPen = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_PEN); 182hCurrentBrush = hInitialBrush = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_BRUSH); 183hCurrentBmp = hInitialBmp = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_BITMAP); 184hCurrentFont = hInitialFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_FONT); 194IntPtr currentPen = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialPen)); 202IntPtr currentBrush = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBrush)); 210IntPtr currentBmp = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBmp)); 218IntUnsafeNativeMethods.DeleteObject(new HandleRef(this, handleToDelete)); 257this.hWnd = IntUnsafeNativeMethods.WindowFromDC( new HandleRef( this, this.hDC) ); 310IntPtr compatibleDc = IntUnsafeNativeMethods.CreateCompatibleDC( new HandleRef(null, hdc) ); 386IntUnsafeNativeMethods.DeleteHDC(new HandleRef(this, this.hDC)); 398IntUnsafeNativeMethods.DeleteDC(new HandleRef(this, this.hDC)); 437this.hDC = IntUnsafeNativeMethods.GetDC(new HandleRef(this, this.hWnd)); 459IntUnsafeNativeMethods.ReleaseDC(new HandleRef(this, this.hWnd), new HandleRef(this, this.hDC)); 479return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.GetGraphicsMode( new HandleRef( this, this.Hdc ) ); 496return (DeviceContextGraphicsMode) IntUnsafeNativeMethods.SetGraphicsMode( new HandleRef( this, this.Hdc ), unchecked((int) newMode)); 516IntUnsafeNativeMethods.RestoreDC(new HandleRef(this, this.hDC), -1); 567HandleRef hdc = new HandleRef( this, this.Hdc); 605HandleRef hdc = new HandleRef(this, this.Hdc); 606HandleRef hRegion = new HandleRef(region, region.HRegion); 626int result = IntUnsafeNativeMethods.GetClipRgn(new HandleRef( this, this.Hdc), new HandleRef(clip, clip.HRegion)); 649IntUnsafeNativeMethods.OffsetViewportOrgEx( new HandleRef( this, this.Hdc ), dx, dy, orgn );
misc\GDI\DeviceContext2.cs (24)
66return ColorTranslator.FromWin32(IntUnsafeNativeMethods.GetBkColor( new HandleRef( this, this.Hdc ))); 81return ColorTranslator.FromWin32(IntUnsafeNativeMethods.SetBkColor( new HandleRef( this, this.Hdc ), ColorTranslator.ToWin32(newColor))); 91return (DeviceContextBackgroundMode) IntUnsafeNativeMethods.GetBkMode( new HandleRef( this, this.Hdc ) ); 106return (DeviceContextBackgroundMode) IntUnsafeNativeMethods.SetBkMode(new HandleRef(this, this.Hdc), (int) newMode); 117return (DeviceContextBinaryRasterOperationFlags) IntUnsafeNativeMethods.GetROP2( new HandleRef( this, this.Hdc ) ); 135return (DeviceContextBinaryRasterOperationFlags) IntUnsafeNativeMethods.SetROP2(new HandleRef(this, this.Hdc), (int) rasterOperation); 239IntPtr hCurrentFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_FONT); 242IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( null, hInitialFont)); 313IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( null, hInitialFont )); 323return IntUnsafeNativeMethods.GetDeviceCaps( new HandleRef( this, this.Hdc ), (int) capabilityIndex ); 333return (DeviceContextMapMode) IntUnsafeNativeMethods.GetMapMode( new HandleRef( this, this.Hdc ) ); 363return (DeviceContextMapMode) IntUnsafeNativeMethods.SetMapMode( new HandleRef(this, this.Hdc), (int) newMode ); 383return IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( null, hObj)); 393return (DeviceContextTextAlignment) IntUnsafeNativeMethods.GetTextAlign( new HandleRef( this, this.Hdc ) ); 408return (DeviceContextTextAlignment) IntUnsafeNativeMethods.SetTextAlign(new HandleRef(this, this.Hdc), (int) newAligment ); 419return ColorTranslator.FromWin32(IntUnsafeNativeMethods.GetTextColor( new HandleRef( this, this.Hdc ) )); 434return ColorTranslator.FromWin32(IntUnsafeNativeMethods.SetTextColor(new HandleRef( this, this.Hdc), ColorTranslator.ToWin32(newColor))); 445IntUnsafeNativeMethods.GetViewportExtEx( new HandleRef( this, this.Hdc ), size ); 462IntUnsafeNativeMethods.SetViewportExtEx( new HandleRef( this, this.Hdc ), newExtent.Width, newExtent.Height, oldExtent ); 475IntUnsafeNativeMethods.GetViewportOrgEx( new HandleRef( this, this.Hdc ), point ); 491IntUnsafeNativeMethods.SetViewportOrgEx( new HandleRef( this, this.Hdc ), newOrigin.X, newOrigin.Y, oldOrigin );
misc\GDI\WindowsFont.cs (4)
93IntUnsafeNativeMethods.GetObject(new HandleRef(this, this.hFont), this.logFont); 255IntPtr hFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(null, hdc), IntNativeMethods.OBJ_FONT); 282IntUnsafeNativeMethods.GetObject(new HandleRef(null, hFont), lf); 317IntUnsafeNativeMethods.DeleteObject(new HandleRef(this, this.hFont));
misc\GDI\WindowsGraphics2.cs (15)
78HandleRef hdc = new HandleRef( this.dc, this.dc.Hdc); 83IntUnsafeNativeMethods.SelectObject(hdc, new HandleRef(pen, pen.HPen)); 108HandleRef hdc = new HandleRef( this.dc, this.dc.Hdc); 113IntUnsafeNativeMethods.SelectObject(hdc, new HandleRef(pen, pen.HPen)); 118IntUnsafeNativeMethods.SelectObject(hdc, new HandleRef(brush, brush.HBrush)); 211HandleRef hdc = new HandleRef( this.dc, this.dc.Hdc); 298HandleRef hdc = new HandleRef(null, this.dc.Hdc); 385HandleRef hdc = new HandleRef(null, this.dc.Hdc); 487HandleRef hdc = new HandleRef(null, this.dc.Hdc); 588HandleRef hdc = new HandleRef(this.dc, this.dc.Hdc); 602IntUnsafeNativeMethods.SelectObject(hdc, new HandleRef(null, IntUnsafeNativeMethods.GetStockObject(IntNativeMethods.HOLLOW_BRUSH))); 626HandleRef hdc = new HandleRef(this.dc, this.dc.Hdc); 638IntUnsafeNativeMethods.FillRect(hdc, ref rect, new HandleRef(brush, hBrush)); 658HandleRef hdc = new HandleRef(this.dc, this.dc.Hdc); 703HandleRef hdc = new HandleRef( this.dc, this.dc.Hdc );
misc\GDI\WindowsRegion.cs (5)
126return IntUnsafeNativeMethods.CombineRgn(new HandleRef(this, this.HRegion), new HandleRef(region1, region1.HRegion), new HandleRef(region2, region2.HRegion), mode); 152IntUnsafeNativeMethods.DeleteObject(new HandleRef(this, this.nativeHandle)); 195IntUnsafeNativeMethods.GetRgnBox(new HandleRef(this, this.nativeHandle), ref rect);
winforms\Managed\System\WinForms\AccessibleObject.cs (2)
2393new HandleRef(this, handle), 2402new HandleRef(this, handle),
winforms\Managed\System\WinForms\Application.cs (41)
158IntPtr pFunc = UnsafeNativeMethods.GetProcAddress(new HandleRef(null, hModule), "ImageList_WriteEx"); 166IntPtr pFunc = UnsafeNativeMethods.GetProcAddress(new HandleRef(null, hModule), "ImageList_WriteEx"); 795SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(null, handle), out processId); 796if (processId == thisPID && SafeNativeMethods.IsWindowVisible(new HandleRef(null, handle))) { 799SafeNativeMethods.RedrawWindow(new HandleRef(null, handle), 815UnsafeNativeMethods.EnumChildWindows(new HandleRef(null, handle), 820UnsafeNativeMethods.SendMessage(new HandleRef(null, handle), NativeMethods.WM_THEMECHANGED, 0, 0); 2110if (msg.hwnd != IntPtr.Zero && SafeNativeMethods.IsWindowUnicode(new HandleRef(null, msg.hwnd))) { 2396UnsafeNativeMethods.DuplicateHandle(new HandleRef(null, SafeNativeMethods.GetCurrentProcess()), new HandleRef(null, SafeNativeMethods.GetCurrentThread()), 2397new HandleRef(null, SafeNativeMethods.GetCurrentProcess()), ref address, 0, false, 2450UnsafeNativeMethods.CoRegisterMessageFilter(new HandleRef(null, msgFilterPtr), ref dummy); 2818UnsafeNativeMethods.CloseHandle(new HandleRef(this, handle)); 2865int hwndThread = SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(parkingWindows[0], parkingWindows[0].Handle), out pid); 3008UnsafeNativeMethods.CloseHandle(new HandleRef(this, handle)); 3405HandleRef hwndOwner = new HandleRef(null, IntPtr.Zero); 3428hwndOwner = new HandleRef(null, UnsafeNativeMethods.GetWindowLong(new HandleRef(currentForm, currentForm.Handle), NativeMethods.GWL_HWNDPARENT)); 3436hwndOwner = new HandleRef(null, IntPtr.Zero); 3445SafeNativeMethods.IsWindowEnabled(new HandleRef(currentForm, currentForm.Handle)) != modalEnabled) { 3446SafeNativeMethods.EnableWindow(new HandleRef(currentForm, currentForm.Handle), modalEnabled); 3535if (msg.hwnd != IntPtr.Zero && SafeNativeMethods.IsWindowUnicode(new HandleRef(null, msg.hwnd))) { 3697IntPtr hwndRoot = UnsafeNativeMethods.GetAncestor(new HandleRef(null, msg.hwnd), NativeMethods.GA_ROOT); 3702if (hwndRoot != IntPtr.Zero && UnsafeNativeMethods.IsDialogMessage(new HandleRef(null, hwndRoot), ref msg)) 3968SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(null, UnsafeNativeMethods.GetActiveWindow()), out pid); 4149int id = SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(this, HandleInternal), out lpdwProcessId); 4156UnsafeNativeMethods.PostMessage(new HandleRef(this, HandleInternal), WM_CHECKDESTROY, IntPtr.Zero, IntPtr.Zero); 4167IntPtr hwndChild = UnsafeNativeMethods.GetWindow(new HandleRef(this, Handle), NativeMethods.GW_CHILD); 4187UnsafeNativeMethods.SetParent(handle, new HandleRef(this, Handle)); 4211UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), WM_CHECKDESTROY, IntPtr.Zero, IntPtr.Zero); 4251if (SafeNativeMethods.IsWindowVisible(new HandleRef(null, hWnd)) && SafeNativeMethods.IsWindowEnabled(new HandleRef(null, hWnd))) { 4275if (UnsafeNativeMethods.IsWindow(new HandleRef(null, hWnd))) { 4301if (UnsafeNativeMethods.IsWindow(new HandleRef(null, hWnd))) SafeNativeMethods.EnableWindow(new HandleRef(null, hWnd), state); 4313if (activeHwnd != IntPtr.Zero && UnsafeNativeMethods.IsWindow(new HandleRef(null, activeHwnd))) { 4314UnsafeNativeMethods.SetActiveWindow(new HandleRef(null, activeHwnd)); 4317if (focusedHwnd != IntPtr.Zero && UnsafeNativeMethods.IsWindow(new HandleRef(null, focusedHwnd))) { 4318UnsafeNativeMethods.SetFocus(new HandleRef(null, focusedHwnd)); 4345IntPtr parentHandle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, MainForm.Handle), NativeMethods.GWL_HWNDPARENT); 4350parentWindowContext = GetContextForHandle(new HandleRef(this, parentHandle));
winforms\Managed\System\WinForms\AxHost.cs (22)
1348uiDeactivate = !UnsafeNativeMethods.IsChild(new HandleRef(this, GetHandleNoCreate()), new HandleRef(null, hwndFocus)); 1455logPixelsX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSX); 1456logPixelsY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSY); 1458UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 1615IntPtr currentWndproc = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 1626UnsafeNativeMethods.SetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC, new HandleRef(this, currentWndproc)); 2123if (SafeNativeMethods.IsAccelerator(new HandleRef(ctlInfo, ctlInfo.hAccel), ctlInfo.cAccel, ref msg, null)) { 3381SafeNativeMethods.OleCreatePropertyFrame(new HandleRef(this, handle), 0, 0, name, 1, ref o, uuids.cElems, new HandleRef(null, uuids.pElems), Application.CurrentCulture.LCID, 0, IntPtr.Zero); 3501Application.ParkHandle(new HandleRef(ipo, hwnd)); 3561IntPtr wndProc = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 3591wndprocAddr = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_WNDPROC); 5160int hr = UnsafeNativeMethods.VarFormat(ref var, new HandleRef(null, pszFormat), firstD, firstW, 32 /* VAR_FORMAT_NOSUBSTITUTE */, ref pbstr); 5175SafeNativeMethods.SysFreeString(new HandleRef(null, pbstr)); 6694IntPtr pointer = UnsafeNativeMethods.GlobalLock(new HandleRef(null, hglobal)); 6701UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, hglobal)); 6706iLockBytes = UnsafeNativeMethods.CreateILockBytesOnHGlobal(new HandleRef(null, hglobal), true); 6722UnsafeNativeMethods.GlobalFree(new HandleRef(null, hglobal)); 6796IntPtr pointer = UnsafeNativeMethods.GlobalLock(new HandleRef(null, hglobal)); 6807UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, hglobal));
winforms\Managed\System\WinForms\ButtonInternal\ButtonStandardAdapter.cs (2)
100SafeNativeMethods.FillRect(new HandleRef(e, e.HDC), ref r, new HandleRef(this,
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxBaseAdapter.cs (1)
263SafeNativeMethods.DrawFrameControl(new HandleRef(offscreen, dc), ref rcCheck,
winforms\Managed\System\WinForms\CheckedListBox.cs (3)
551SafeNativeMethods.InvalidateRect(new HandleRef(this, Handle), ref rect, false); 880SafeNativeMethods.InvalidateRect(new HandleRef(this, Handle), null, true); 1672UnsafeNativeMethods.ClientToScreen(new HandleRef(ParentCheckedListBox, ParentCheckedListBox.Handle), pt);
winforms\Managed\System\WinForms\ColumnHeader.cs (4)
397IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(listview, listview.Handle), NativeMethods.LVM_GETHEADER, 0, 0); 399int nativeColumnCount = (int)UnsafeNativeMethods.SendMessage(new HandleRef(listview, hwndHdr), NativeMethods.HDM_GETITEMCOUNT, 0, 0); 401width = (int)UnsafeNativeMethods.SendMessage(new HandleRef(listview, listview.Handle), NativeMethods.LVM_GETCOLUMNWIDTH, Index, 0); 475 UnsafeNativeMethods.SendMessage(new HandleRef(this.listview, this.listview.Handle), NativeMethods.LVM_SETCOLUMNORDERARRAY, cols.Length, cols);
winforms\Managed\System\WinForms\ComboBox.cs (48)
1132UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.EM_REPLACESEL, NativeMethods.InvalidIntPtr, str); 1152UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.CB_GETEDITSEL, start, end); 1173UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.CB_GETEDITSEL, value, (int[])null); 1608UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref comboRectMid); 1613UnsafeNativeMethods.GetWindowRect(new HandleRef(this, childEdit.Handle), ref editRectMid); 1769UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.EM_SETMARGINS, 1838UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 1930UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.WM_CONTEXTMENU, m.WParam, m.LParam); 1983UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref rect); 2049SafeNativeMethods.InvalidateRect(new HandleRef(this, childEdit.Handle), null, false); 2052SafeNativeMethods.InvalidateRect(new HandleRef(this, childListBox.Handle), null, false); 2211SafeNativeMethods.SetTextColor(new HandleRef(null, dc), ColorTranslator.ToWin32(ForeColor)); 2212SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(BackColor)); 2293SafeNativeMethods.RedrawWindow(new HandleRef(this, Handle), 2359UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.CB_GETLBTEXT, index, sb); 2440IntPtr hwnd = UnsafeNativeMethods.GetWindow(new HandleRef(this, Handle), NativeMethods.GW_CHILD); 2451hwnd = UnsafeNativeMethods.GetWindow(new HandleRef(this, hwnd), NativeMethods.GW_HWNDNEXT); 2459UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.EM_SETMARGINS, 3165SafeNativeMethods.SHAutoComplete(new HandleRef(this, childEdit.Handle), mode); 3172if (!stringSource.Bind(new HandleRef(this, childEdit.Handle), (int)AutoCompleteMode)) { 3189SafeNativeMethods.SHAutoComplete(new HandleRef(this, childEdit.Handle), mode); 3196if (!stringSource.Bind(new HandleRef(this, childEdit.Handle), (int)AutoCompleteMode)) { 3212SafeNativeMethods.SHAutoComplete(new HandleRef(this, childEdit.Handle), mode); 3229int ret = SafeNativeMethods.SHAutoComplete(new HandleRef(this, childEdit.Handle), (int)AutoCompleteSource | mode); 3239SafeNativeMethods.SHAutoComplete(new HandleRef(this, childEdit.Handle), mode); 3376SafeNativeMethods.SetWindowPos(new HandleRef(this, dropDownHandle), NativeMethods.NullHandleRef, 0, 0, DropDownWidth, height, 3443UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.WM_SETTEXT, IntPtr.Zero, s); 3454SafeNativeMethods.GetClientRect(new HandleRef(this, Handle), ref rect); 3621SafeNativeMethods.SelectPalette(new HandleRef(this, dis.hDC), new HandleRef(null, oldPal), 0); 3689UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_MOUSELEAVE, 0, 0); 3724UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 3763NativeMethods.RegionFlags updateRegionFlags = (NativeMethods.RegionFlags)SafeNativeMethods.GetUpdateRgn(new HandleRef(this, this.Handle), new HandleRef(this, wr.HRegion), true); 3775dc = UnsafeNativeMethods.BeginPaint(new HandleRef(this, Handle), ref ps); 3799UnsafeNativeMethods.EndPaint(new HandleRef(this, Handle), ref ps); 3940new HandleRef(this, Handle), 3983m.Result = UnsafeNativeMethods.LresultFromObject(ref IID_IAccessible, m.WParam, new HandleRef(this, punkAcc)); 4804SafeNativeMethods.InvalidateRect(new HandleRef(this, _owningComboBox.GetListHandle()), null, false); 5137UnsafeNativeMethods.UiaHostProviderFromHwnd(new HandleRef(this, _handle), out provider); 5355UnsafeNativeMethods.UiaHostProviderFromHwnd(new HandleRef(this, _childListControlhandle), out provider); 5767UnsafeNativeMethods.EnumChildWindows(new HandleRef(this, acHandle), 5782return SafeNativeMethods.IsWindowVisible(new HandleRef(this, Handle)); 5871UnsafeNativeMethods.EnumThreadWindows(SafeNativeMethods.GetCurrentThreadId(), new NativeMethods.EnumThreadWindowsCallback(this.Callback), new HandleRef(null, IntPtr.Zero)); 5875HandleRef hRef = new HandleRef(null, hWnd); 6110SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.Handle), ref validRect); 6115SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.Handle), ref validRect); 6120SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.Handle), ref validRect); 6125SafeNativeMethods.ValidateRect(new HandleRef(comboBox, comboBox.Handle), ref validRect);
winforms\Managed\System\WinForms\CommonDialog.cs (9)
155UnsafeNativeMethods.SetFocus(new HandleRef(null, wparam)); 158UnsafeNativeMethods.PostMessage(new HandleRef(null, hWnd), CDM_SETDEFAULTFOCUS, 0, 0); 165UnsafeNativeMethods.SetFocus(new HandleRef(this, defaultControlHwnd)); 178UnsafeNativeMethods.GetWindowRect(new HandleRef(null, hWnd), ref r); 182SafeNativeMethods.SetWindowPos(new HandleRef(null, hWnd), NativeMethods.NullHandleRef, x, y, 0, 0, NativeMethods.SWP_NOSIZE | 304defOwnerWndProc = UnsafeNativeMethods.SetWindowLong(new HandleRef(this, hwndOwner), NativeMethods.GWL_WNDPROC, ownerProc); 319IntPtr currentSubClass = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, hwndOwner), NativeMethods.GWL_WNDPROC); 321UnsafeNativeMethods.SetWindowLong(new HandleRef(this, hwndOwner), NativeMethods.GWL_WNDPROC, new HandleRef(this, defOwnerWndProc));
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2ComponentEditor.cs (3)
69SafeNativeMethods.OleCreatePropertyFrame(new HandleRef(parent, handle), 0, 0, "PropertyPages", 1, ref o, 1, new Guid[]{guid}, Application.CurrentCulture.LCID, 0, IntPtr.Zero); 92SafeNativeMethods.OleCreatePropertyFrame(new HandleRef(parent, handle), 0, 0, "PropertyPages", 1, ref o, uuids.cElems, new HandleRef(uuids, uuids.pElems), Application.CurrentCulture.LCID, 0, IntPtr.Zero);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2IManagedPerPropertyBrowsingHandler.cs (2)
207SafeNativeMethods.SysFreeString(new HandleRef(null, bstr)); 240SafeNativeMethods.VariantClear(new HandleRef(null, curVariant));
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyBuilderUITypeEditor.cs (1)
75new HandleRef(null, parentHandle),
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (2)
1243SafeNativeMethods.VariantInit(new HandleRef(null, mem)); 1322SafeNativeMethods.VariantClear(new HandleRef(null, mem));
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyPageUITypeConverter.cs (3)
101SafeNativeMethods.OleCreatePropertyFrame(new HandleRef(null, parentHandle), 105new HandleRef(null, (IntPtr)(long)pAddrs), 107new HandleRef(null, guidsAddr),
winforms\Managed\System\WinForms\ContainerControl.cs (7)
679UnsafeNativeMethods.SetFocus(new HandleRef(activeControl, activeControl.Handle)); 698UnsafeNativeMethods.SetFocus(new HandleRef(cc, cc.Handle)); 716UnsafeNativeMethods.GetClientRect(new HandleRef(this, this.Handle), ref clientRectangle); 718UnsafeNativeMethods.ClientToScreen(new HandleRef(this, this.Handle), topLeftPoint); 744HandleRef hdc = new HandleRef(this, dc); 754HandleRef hfont = new HandleRef(this, FontHandle); 755HandleRef hfontOld = new HandleRef(this, SafeNativeMethods.SelectObject(hdc, hfont));
winforms\Managed\System\WinForms\ContextMenu.cs (2)
231SafeNativeMethods.TrackPopupMenuEx(new HandleRef(this, Handle), 235new HandleRef(control, control.Handle),
winforms\Managed\System\WinForms\Control.cs (205)
1405bool visible = SafeNativeMethods.IsWindowVisible(new HandleRef(window, Handle)); 1406bool enabled = SafeNativeMethods.IsWindowEnabled(new HandleRef(window, Handle)); 1480UnsafeNativeMethods.SetCapture(new HandleRef(this, Handle)); 1678if (UnsafeNativeMethods.IsChild(new HandleRef(this, this.Handle), new HandleRef(this, focusHwnd))) { 2020return SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(this, Handle), out pid); 2089UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 2929IntPtr parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(this, Handle)); 2937int len = UnsafeNativeMethods.GetClassName(new HandleRef(null, lastParentHandle), null, 0); 2941UnsafeNativeMethods.GetClassName(new HandleRef(null, lastParentHandle), sb, sb.Capacity); 2949parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(null, parentHandle)); 3000UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref temp); 3015(next = UnsafeNativeMethods.GetWindow(new HandleRef(null, prev), NativeMethods.GW_HWNDPREV)) != IntPtr.Zero; 3018UnsafeNativeMethods.GetWindowRect(new HandleRef(null, next), ref temp); 3021if (SafeNativeMethods.IsWindowVisible(new HandleRef(null, next))) { 3087hwnd = new HandleRef(this, Handle); 3096hwnd = new HandleRef(marshalingControl, marshalingControl.Handle); 3592if (UnsafeNativeMethods.SetWindowRgn(new HandleRef(this, Handle), new HandleRef(this, regionHandle), SafeNativeMethods.IsWindowVisible(new HandleRef(this, Handle))) != 0) { 3599SafeNativeMethods.DeleteObject(new HandleRef(null, regionHandle)); 4219UnsafeNativeMethods.SendMessage(new HandleRef(TopMostParent, TopMostParent.Handle), 4262UnsafeNativeMethods.SendMessage(new HandleRef(TopMostParent, TopMostParent.Handle), 4472return unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE)); 4475UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE, new HandleRef(null, (IntPtr)value)); 4485return unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE)); 4488UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)value)); 4538int textLen = SafeNativeMethods.GetWindowTextLength(new HandleRef(window, Handle)); 4546UnsafeNativeMethods.GetWindowText(new HandleRef(window, Handle), sb, sb.Capacity); 4554UnsafeNativeMethods.SetWindowText(new HandleRef(window, Handle), value); 5293UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new HandleRef(this, Handle), objectID, childID + 1); 5615else if (IsHandleCreated && GetTopLevel() && SafeNativeMethods.IsWindowEnabled(new HandleRef(window, Handle))) { 5616SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0, 5948if (UnsafeNativeMethods.PeekMessage(ref msg, new HandleRef(this, Handle), threadCallbackMessage, 5978if (0 != (NativeMethods.WS_EX_MDICHILD & (int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(window, InternalHandle), NativeMethods.GWL_EXSTYLE))) { 6000SafeNativeMethods.DeleteObject(new HandleRef(this, p)); 6174UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.WM_PRINT, (IntPtr)hDc, 6180SafeNativeMethods.BitBlt(new HandleRef(destGraphics, desthDC), targetBounds.X, targetBounds.Y, width, height, 6181new HandleRef(g, hDc), 0, 0, 0xcc0020); 6214if (SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(marshaler, marshaler.Handle), out pid) == SafeNativeMethods.GetCurrentThreadId()) { 6370UnsafeNativeMethods.SetFocus(new HandleRef(this, Handle)); 6409handle = UnsafeNativeMethods.GetAncestor(new HandleRef(null, handle), NativeMethods.GA_PARENT); 6485IntPtr hwnd = UnsafeNativeMethods.ChildWindowFromPointEx(new HandleRef(null, Handle), pt.X, pt.Y, value); 6675int id = UnsafeNativeMethods.GetMenuItemID(new HandleRef(null, hmenu), item); 6678childMenu = UnsafeNativeMethods.GetSubMenu(new HandleRef(null, hmenu), item); 6679int count = UnsafeNativeMethods.GetMenuItemCount(new HandleRef(null, childMenu)); 6802for (IntPtr hWndChild = UnsafeNativeMethods.GetWindow(new HandleRef(null, hWndParent), NativeMethods.GW_CHILD); 6804hWndChild = UnsafeNativeMethods.GetWindow(new HandleRef(null, hWndChild), NativeMethods.GW_HWNDNEXT)) { 7047Debug.Assert(hWnd == IntPtr.Zero || UnsafeNativeMethods.IsWindow(new HandleRef(null, hWnd))); 7053if (hWnd == IntPtr.Zero || UnsafeNativeMethods.IsWindow(new HandleRef(null, hWnd))) { 7142SafeNativeMethods.SetTextColor(new HandleRef(null, dc), ColorTranslator.ToWin32(ForeColor)); 7143SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(BackColor)); 7218SafeNativeMethods.RedrawWindow(new HandleRef(this, Handle), 7219null, new HandleRef(region, regionHandle), 7228SafeNativeMethods.InvalidateRgn(new HandleRef(this, Handle), 7229new HandleRef(region, regionHandle), 7235SafeNativeMethods.DeleteObject(new HandleRef(region, regionHandle)); 7269SafeNativeMethods.RedrawWindow(new HandleRef(window, Handle), 7279SafeNativeMethods.InvalidateRect(new HandleRef(window, Handle), 7314SafeNativeMethods.RedrawWindow(new HandleRef(window, Handle), 7328SafeNativeMethods.InvalidateRect(new HandleRef(window, Handle), 7805if (SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(this, Handle), out pid) == SafeNativeMethods.GetCurrentThreadId()) { 7838UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero); 7971SafeNativeMethods.DeleteObject(new HandleRef(this, p)); 8170SafeNativeMethods.EnableWindow(new HandleRef(this, Handle), Enabled); 8405UnsafeNativeMethods.SetParent(new HandleRef(this, this.Handle), new HandleRef(parent, parent.Handle)); 8435Application.ParkHandle(new HandleRef(this, this.Handle), this.DpiAwarenessContext); 8732deviceDpi = (int)UnsafeNativeMethods.GetDpiForWindow(new HandleRef(this, HandleInternal)); 8752if (UnsafeNativeMethods.SetWindowRgn(new HandleRef(this, Handle), new HandleRef(this, regionHandle), SafeNativeMethods.IsWindowVisible(new HandleRef(this, Handle))) != 0) { 8759SafeNativeMethods.DeleteObject(new HandleRef(null, regionHandle)); 8792UnsafeNativeMethods.SetWindowText(new HandleRef(this, Handle), text); 8817UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero); 8833if (UnsafeNativeMethods.GetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_HORZ,si) != false) { 8876SafeNativeMethods.DeleteObject(new HandleRef(this, p)); 9404UnsafeNativeMethods.GetClientRect(new HandleRef(window, InternalHandle), ref rect); 10090UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(this, Handle), point, 1); 10107UnsafeNativeMethods.MapWindowPoints(new HandleRef(this, Handle), NativeMethods.NullHandleRef, point, 1); 10352HandleRef hClippingRegion = new HandleRef(null, SafeNativeMethods.CreateRectRgn(viewportOrg.x,viewportOrg.y, viewportOrg.x + this.Width, viewportOrg.y + this.Height)); 10379bool success = UnsafeNativeMethods.GetWindowRect(new HandleRef(null, this.Handle), ref windowRect); 10825new HandleRef(topMostParent, topMostParent.Handle), 10826UnsafeNativeMethods.GetParent(new HandleRef(null, topMostParent.Handle)) == IntPtr.Zero ? NativeMethods.WM_CHANGEUISTATE : NativeMethods.WM_UPDATEUISTATE, 10858while (UnsafeNativeMethods.PeekMessage(ref msg, new HandleRef(this, hwnd), 10970HandleRef parentHandle = new HandleRef(this, UnsafeNativeMethods.GetParent(new HandleRef(this, this.Handle))); 11036UnsafeNativeMethods.SetParent(new HandleRef(this, this.Handle), parentHandle); 11062UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(this, Handle), ref rect, 2); 11079UnsafeNativeMethods.MapWindowPoints(new HandleRef(this, Handle), NativeMethods.NullHandleRef, ref rect, 2); 11121UnsafeNativeMethods.UiaReturnRawElementProvider(new HandleRef(this, handle), new IntPtr(0), new IntPtr(0), null); 11246int n = UnsafeNativeMethods.RegisterDragDrop(new HandleRef(this, Handle), (UnsafeNativeMethods.IOleDropTarget)(new DropTarget(this))); 11255int n = UnsafeNativeMethods.RevokeDragDrop(new HandleRef(this, Handle)); 11732return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, lparam); 11741return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, ref wparam, ref lparam); 11745return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, (IntPtr)wparam, lparam); 11750return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, lparam); 11755return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, (IntPtr)lparam); 11764return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, ref lparam); 11773return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, lparam); 11782return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, lparam); 11793SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), NativeMethods.HWND_BOTTOM, 0, 0, 0, 0, 11898SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), NativeMethods.NullHandleRef, x, y, width, height, flags); 11971IntPtr parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(window, Handle)); 11998Application.ParkHandle(new HandleRef(window, Handle), this.DpiAwarenessContext); 12002UnsafeNativeMethods.SetParent(new HandleRef(window, Handle), new HandleRef(null, value)); 12006Application.UnparkHandle(new HandleRef(window, Handle), window.DpiAwarenessContext); 12014UnsafeNativeMethods.SetParent(new HandleRef(window, Handle), new HandleRef(null, IntPtr.Zero)); 12015Application.UnparkHandle(new HandleRef(window, Handle), window.DpiAwarenessContext); 12055IntPtr result = SafeNativeMethods.SelectPalette(new HandleRef(null, dc), new HandleRef(null, halftonePalette), (force ? 0 : 1)); 12058SafeNativeMethods.RealizePalette(new HandleRef(null, dc)); 12131SafeNativeMethods.ShowWindow(new HandleRef(this, Handle), value ? ShowParams : NativeMethods.SW_HIDE); 12144SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), 12183if (!SafeNativeMethods.IsWindowVisible(new HandleRef(this,this.Handle))) { 12198new HandleRef(window, Handle), NativeMethods.NullHandleRef, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | 12418int styleFlags = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 12419UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)(value? styleFlags | flag: styleFlags & ~flag))); 12505SafeNativeMethods.UpdateWindow(new HandleRef(window, InternalHandle)); 12517UnsafeNativeMethods.GetClientRect(new HandleRef(window, InternalHandle), ref rect); 12520UnsafeNativeMethods.GetWindowRect(new HandleRef(window, InternalHandle), ref rect); 12522UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(null, UnsafeNativeMethods.GetParent(new HandleRef(window, InternalHandle))), ref rect, 2); 12644while ((hWnd = UnsafeNativeMethods.GetWindow(new HandleRef(null, hWnd), NativeMethods.GW_HWNDPREV)) != IntPtr.Zero) { 12672IntPtr parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(this, Handle)); 12705if (UnsafeNativeMethods.GetWindow(new HandleRef(ctl.window, ctl.Handle), NativeMethods.GW_HWNDPREV) != prevHandle) { 12708SafeNativeMethods.SetWindowPos(new HandleRef(ctl.window, ctl.Handle), new HandleRef(null, prevHandle), 0, 0, 0, 0, 12756new HandleRef(this, Handle), NativeMethods.NullHandleRef, 0, 0, 0, 0, 12800parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(null, parentHandle)); 12802int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(null, lastParentHandle), NativeMethods.GWL_STYLE))); 12811UnsafeNativeMethods.PostMessage(new HandleRef(null, lastParentHandle), NativeMethods.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 12965UnsafeNativeMethods.GetClientRect(new HandleRef(this, Handle), ref rc); 13045new HandleRef(this, Handle), 13110m.Result = UnsafeNativeMethods.LresultFromObject(ref IID_IAccessible, m.WParam, new HandleRef(ctrlAccessibleObject, punkAcc)); 13423deviceDpi = (int)UnsafeNativeMethods.GetDpiForWindow(new HandleRef(this, HandleInternal)); 13450uint dpi = UnsafeNativeMethods.GetDpiForWindow(new HandleRef(this, HandleInternal)); 13586m.Result = UnsafeNativeMethods.SendMessage(new HandleRef(null, nmhdr->hwndFrom), NativeMethods.WM_REFLECT + m.Msg, m.WParam, m.LParam); 13590UnsafeNativeMethods.SendMessage(new HandleRef(null, nmhdr->hwndFrom), NativeMethods.WM_REFLECT + m.Msg, m.WParam, m.LParam); 13617IntPtr p = UnsafeNativeMethods.GetDlgItem(new HandleRef(null, m.HWnd), ctrlId); 13669dc = UnsafeNativeMethods.BeginPaint(new HandleRef(this, hWnd), ref ps); 13767SafeNativeMethods.SelectPalette(new HandleRef(null, dc), new HandleRef(null, oldPal), 0); 13778UnsafeNativeMethods.EndPaint(new HandleRef(this, hWnd), ref ps); 13795IntPtr dc = UnsafeNativeMethods.GetDC(new HandleRef(this, Handle)); 13801UnsafeNativeMethods.ReleaseDC(new HandleRef(this, Handle), new HandleRef(null, dc)); 13873hWnd = UnsafeNativeMethods.GetDlgItem(new HandleRef(this, Handle), NativeMethods.Util.HIWORD(m.WParam)); 14075if (parent != null && UnsafeNativeMethods.GetParent(new HandleRef(window, InternalHandle)) == parent.InternalHandle && 14425result = UnsafeNativeMethods.SendMessage(new HandleRef(null, hwndFocus), 14429hwndFocus = UnsafeNativeMethods.GetParent(new HandleRef(null, hwndFocus)); 16194UnsafeNativeMethods.GetWindowRect(new HandleRef(this, this.Handle), ref rectangle); 16510logPixels.X = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), NativeMethods.LOGPIXELSX); 16511logPixels.Y = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), NativeMethods.LOGPIXELSY); 16512UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc)); 16576UnsafeNativeMethods.MapWindowPoints(new HandleRef(null, hwndMap), new HandleRef(control, control.Handle), pt, 1); 16584UnsafeNativeMethods.MapWindowPoints(new HandleRef(target, target.Handle), new HandleRef(realTarget, realTarget.Handle), pt, 1); 16666int hdcType = UnsafeNativeMethods.GetObjectType(new HandleRef(null, hdcDraw)); 16693SafeNativeMethods.LPtoDP(new HandleRef(null, hdcDraw), ref rc, 2); 16695iMode = SafeNativeMethods.SetMapMode(new HandleRef(null, hdcDraw), NativeMethods.MM_ANISOTROPIC); 16696SafeNativeMethods.SetWindowOrgEx(new HandleRef(null, hdcDraw), 0, 0, pW); 16697SafeNativeMethods.SetWindowExtEx(new HandleRef(null, hdcDraw), control.Width, control.Height, sWindowExt); 16698SafeNativeMethods.SetViewportOrgEx(new HandleRef(null, hdcDraw), rc.left, rc.top, pVp); 16699SafeNativeMethods.SetViewportExtEx(new HandleRef(null, hdcDraw), rc.right - rc.left, rc.bottom - rc.top, sViewportExt); 16714control.PrintToMetaFile(new HandleRef(null, hdcDraw), flags); 16721SafeNativeMethods.SetWindowOrgEx(new HandleRef(null, hdcDraw), pW.x, pW.y, null); 16722SafeNativeMethods.SetWindowExtEx(new HandleRef(null, hdcDraw), sWindowExt.cx, sWindowExt.cy, null); 16723SafeNativeMethods.SetViewportOrgEx(new HandleRef(null, hdcDraw), pVp.x, pVp.y, null); 16724SafeNativeMethods.SetViewportExtEx(new HandleRef(null, hdcDraw), sViewportExt.cx, sViewportExt.cy, null); 16725SafeNativeMethods.SetMapMode(new HandleRef(null, hdcDraw), iMode); 16933 UnsafeNativeMethods.DestroyAcceleratorTable(new HandleRef(this, accelTable)); 16937accelTable = UnsafeNativeMethods.CreateAcceleratorTable(new HandleRef(null, accelBlob), accelCount); 17105UnsafeNativeMethods.SetParent(new HandleRef(control, control.Handle), new HandleRef(null, hwndParent)); 17451SafeNativeMethods.CombineRgn(new HandleRef(null, newRegion), new HandleRef(null, region), new HandleRef(this, clipRegion), NativeMethods.RGN_DIFF); 17452SafeNativeMethods.DeleteObject(new HandleRef(null, region)); 17455SafeNativeMethods.DeleteObject(new HandleRef(null, newRegion)); 18194UnsafeNativeMethods.DestroyAcceleratorTable(new HandleRef(this, accelTable)); 18407IntPtr hWndParent = UnsafeNativeMethods.GetParent(new HandleRef(control, control.Handle)); 18412UnsafeNativeMethods.MapWindowPoints(new HandleRef(null, hWndParent), new HandleRef(control, control.Handle), ref rcIntersect, 2); 18438UnsafeNativeMethods.SetWindowRgn(new HandleRef(control, control.Handle), new HandleRef(this, finalClipRegion), SafeNativeMethods.IsWindowVisible(new HandleRef(control, control.Handle))); 18534if (SafeNativeMethods.IsWindowUnicode(new HandleRef(null, lpmsg.hwnd))) { 19248hBitmapDC = new HandleRef(this, UnsafeNativeMethods.CreateCompatibleDC(NativeMethods.NullHandleRef)); 19252hBitmap = new HandleRef(this, SafeNativeMethods.CreateBitmap(size.Width, size.Height, planes, bitsPixel, IntPtr.Zero)); 19254hOriginalBmp = new HandleRef(this, SafeNativeMethods.SelectObject(hBitmapDC, hBitmap)); 19300HandleRef hNullBitmap = new HandleRef(this, SafeNativeMethods.CreateBitmap(1, 1, 1, 1, IntPtr.Zero)); 19304HandleRef hBitmap = new HandleRef(this, SafeNativeMethods.SelectObject(hdcSrc, hNullBitmap)); 19660UnsafeNativeMethods.FreeLibrary(new HandleRef(null, oleAccAvailable)); 19873UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new HandleRef(this, Handle), NativeMethods.OBJID_CLIENT, 0); 19887UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new HandleRef(this, Handle), NativeMethods.OBJID_CLIENT, childID + 1); 19901UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new HandleRef(this, Handle), objectID, childID + 1); 19954UnsafeNativeMethods.UiaHostProviderFromHwnd(new HandleRef(this, Handle), out provider); 20017SafeNativeMethods.DeleteObject(new HandleRef(this, handle));
winforms\Managed\System\WinForms\Control.Ime.cs (26)
426focusHandle = UnsafeNativeMethods.GetAncestor(new HandleRef(null, focusHandle), NativeMethods.GA_ROOT); 902IntPtr oldContext = UnsafeNativeMethods.ImmAssociateContext( new HandleRef( null, handle ), NativeMethods.NullHandleRef ); 921IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new HandleRef( null, handle ) ); 931UnsafeNativeMethods.ImmAssociateContext( new HandleRef( null, handle ), new HandleRef( null, inputContext ) ); 936UnsafeNativeMethods.ImmAssociateContext( new HandleRef( null, handle ), new HandleRef( null, originalImeContext ) ); 941UnsafeNativeMethods.ImmReleaseContext( new HandleRef( null, handle ), new HandleRef( null, inputContext ) ); 974inputContext = UnsafeNativeMethods.ImmGetContext( new HandleRef( null, handle ) ); 996UnsafeNativeMethods.ImmGetConversionStatus( new HandleRef( null, inputContext ), ref conversion, ref sentence ); 1023UnsafeNativeMethods.ImmReleaseContext( new HandleRef( null, handle ), new HandleRef( null, inputContext ) ); 1113IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new HandleRef( null, handle ) ); 1120retval = UnsafeNativeMethods.ImmGetOpenStatus( new HandleRef( null, inputContext ) ); 1122UnsafeNativeMethods.ImmReleaseContext( new HandleRef( null, handle ), new HandleRef( null, inputContext ) ); 1204IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new HandleRef( null, handle ) ); 1207UnsafeNativeMethods.ImmGetConversionStatus( new HandleRef( null, inputContext ), ref conversion, ref sentence ); 1213bool retval = UnsafeNativeMethods.ImmSetConversionStatus( new HandleRef( null, inputContext ), conversion, sentence ); 1215UnsafeNativeMethods.ImmReleaseContext( new HandleRef( null, handle ), new HandleRef( null, inputContext ) ); 1234IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new HandleRef( null, handle ) ); 1239bool succeeded = UnsafeNativeMethods.ImmSetOpenStatus( new HandleRef( null, inputContext ), open ); 1244succeeded = UnsafeNativeMethods.ImmReleaseContext( new HandleRef( null, handle ), new HandleRef( null, inputContext ) );
winforms\Managed\System\WinForms\ControlPaint.cs (70)
163IntPtr palette = SafeNativeMethods.CreateHalftonePalette(new HandleRef(null, hdcS)); 164UnsafeNativeMethods.GetObject(new HandleRef(null, palette), 2, ref entryCount); 166SafeNativeMethods.GetPaletteEntries(new HandleRef(null, palette), 0, entryCount, entries); 175SafeNativeMethods.DeleteObject(new HandleRef(null, palette)); 205hBitmap = SafeNativeMethods.CreateDIBSection(new HandleRef(null, hdcS), new HandleRef(null, bitmapInfo), NativeMethods.DIB_RGB_COLORS, 215IntPtr previousBitmap = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, hBitmap)); 220SafeNativeMethods.DeleteObject( new HandleRef( null, previousBitmap ) ); 230SafeNativeMethods.DeleteObject( new HandleRef( null, hBitmap ) ); 308IntPtr source = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hdcS)); 309IntPtr target = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hdcS)); 310UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hdcS)); 311IntPtr previousSourceBitmap = SafeNativeMethods.SelectObject(new HandleRef(null, source), new HandleRef(null, monochromeMask)); 312IntPtr previousTargetBitmap = SafeNativeMethods.SelectObject(new HandleRef(null, target), new HandleRef(null, colorMask)); 321SafeNativeMethods.SetBkColor(new HandleRef(null, target), 0x00ffffff); // white 322SafeNativeMethods.SetTextColor(new HandleRef(null, target), 0); // black 323SafeNativeMethods.BitBlt(new HandleRef(null, target), 0, 0, size.Width, size.Height, new HandleRef(null, source), 326SafeNativeMethods.SelectObject(new HandleRef(null, source), new HandleRef(null, previousSourceBitmap)); 327SafeNativeMethods.SelectObject(new HandleRef(null, target), new HandleRef(null, previousTargetBitmap)); 328UnsafeNativeMethods.DeleteCompatibleDC(new HandleRef(null, source)); 329UnsafeNativeMethods.DeleteCompatibleDC(new HandleRef(null, target)); 348SafeNativeMethods.DeleteObject(new HandleRef(null, hBitmap)); 358HandleRef targetHDC = new HandleRef( null, targetDC.GetHdc()); 1284SafeNativeMethods.DrawFrameControl(new HandleRef(null, dc), ref rcCheck, 1783IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE); 1797int prevRop2 = SafeNativeMethods.SetROP2(new HandleRef(null, dc), rop2); 1798IntPtr oldBrush = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, UnsafeNativeMethods.GetStockObject(NativeMethods.HOLLOW_BRUSH))); 1799IntPtr oldPen = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, pen)); 1800SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(graphicsColor)); 1801SafeNativeMethods.Rectangle(new HandleRef(null, dc), rectangle.X, rectangle.Y, rectangle.Right, rectangle.Bottom); 1803SafeNativeMethods.SetROP2(new HandleRef(null, dc), prevRop2); 1804SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, oldBrush)); 1805SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, oldPen)); 1809SafeNativeMethods.DeleteObject(new HandleRef(null, pen)); 1812UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc)); 1826IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE); 1829int prevRop2 = SafeNativeMethods.SetROP2(new HandleRef(null, dc), rop2); 1830IntPtr oldBrush = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, UnsafeNativeMethods.GetStockObject(NativeMethods.HOLLOW_BRUSH))); 1831IntPtr oldPen = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, pen)); 1834SafeNativeMethods.MoveToEx(new HandleRef(null, dc), start.X, start.Y, null); 1835SafeNativeMethods.LineTo(new HandleRef(null, dc), end.X, end.Y); 1837SafeNativeMethods.SetROP2(new HandleRef(null, dc), prevRop2); 1838SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, oldBrush)); 1839SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, oldPen)); 1840SafeNativeMethods.DeleteObject(new HandleRef(null, pen)); 1841UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc)); 2007IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE); 2010int prevRop2 = SafeNativeMethods.SetROP2(new HandleRef(null, dc), rop2); 2011IntPtr oldBrush = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, brush)); 2014SafeNativeMethods.PatBlt(new HandleRef(null, dc), rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, rop3); 2016SafeNativeMethods.SetROP2(new HandleRef(null, dc), prevRop2); 2017SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, oldBrush)); 2018SafeNativeMethods.DeleteObject(new HandleRef(null, brush)); 2019UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc));
winforms\Managed\System\WinForms\Cursor.cs (19)
231UnsafeNativeMethods.SetCursor(new HandleRef(value, handle)); 278SafeNativeMethods.GetIconInfo(new HandleRef(this, currentIcon.Handle), info); 287SafeNativeMethods.ExternalDeleteObject(new HandleRef(null, info.hbmMask)); 292SafeNativeMethods.ExternalDeleteObject(new HandleRef(null, info.hbmColor)); 365return SafeNativeMethods.CopyImage(new HandleRef(this, Handle), NativeMethods.IMAGE_CURSOR, sz.Width, sz.Height, 0); 375UnsafeNativeMethods.DestroyCursor(new HandleRef(this, handle)); 467SafeNativeMethods.DrawIcon(new HandleRef(graphics, dc), targetX, targetY, new HandleRef(this, handle)); 483SafeNativeMethods.DrawIcon(new HandleRef(graphics, dc), targetX, targetY, new HandleRef(this, handle)); 498SafeNativeMethods.IntersectClipRect(new HandleRef(this, Handle), targetX, targetY, targetX+clipWidth, targetY+clipHeight); 499SafeNativeMethods.DrawIconEx(new HandleRef(graphics, dc), targetX - imageX, targetY - imageY, 500new HandleRef(this, handle), drawWidth, drawHeight, 0, NativeMethods.NullHandleRef, NativeMethods.DI_NORMAL); 593SafeNativeMethods.GetIconInfo(new HandleRef(this, iconHandle), info); 597UnsafeNativeMethods.GetObject(new HandleRef(null, info.hbmColor), Marshal.SizeOf(typeof(NativeMethods.BITMAP)), bmp); 598SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmColor)); 602UnsafeNativeMethods.GetObject(new HandleRef(null, info.hbmMask), Marshal.SizeOf(typeof(NativeMethods.BITMAP)), bmp); 607SafeNativeMethods.IntDeleteObject(new HandleRef(null, info.hbmMask)); 640handle = SafeNativeMethods.CopyImageAsCursor(new HandleRef(this, cursorHandle), NativeMethods.IMAGE_CURSOR,
winforms\Managed\System\WinForms\DataGrid.cs (12)
2299SafeNativeMethods.ScrollWindow(new HandleRef(this, Handle), 5857IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 5859IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone)); 5860SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT); 5861SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, saveBrush)); 5862SafeNativeMethods.DeleteObject(new HandleRef(null, halftone)); 5863UnsafeNativeMethods.ReleaseDC(new HandleRef(this, parentHandle), new HandleRef(this, dc)); 8629SafeNativeMethods.ScrollWindow(new HandleRef(this, Handle), 0, deltaY, ref scrollArea, ref scrollArea); 8883SafeNativeMethods.ScrollWindow(new HandleRef(this, Handle), 0, -parentRowsRect.Height, ref scrollRECT, ref scrollRECT);
winforms\Managed\System\WinForms\DataGridToolTip.cs (5)
49UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 50SafeNativeMethods.SetWindowPos(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.HWND_NOTOPMOST, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOACTIVATE); 51UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETDELAYTIME, NativeMethods.TTDT_INITIAL, 0); 73UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_ADDTOOL, 0, toolInfo); 82UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_DELTOOL, 0, toolInfo);
winforms\Managed\System\WinForms\DataGridViewCell.cs (1)
1330UnsafeNativeMethods.SetFocus(new HandleRef(null, IntPtr.Zero));
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (1)
1441SafeNativeMethods.DrawFrameControl(new HandleRef(offscreen, dc), ref rcCheck,
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (3)
840UnsafeNativeMethods.SendMessage(new HandleRef(comboBox, comboBox.Handle), NativeMethods.CB_SETDROPPEDWIDTH, cachedDropDownWidth, 0); 847int dropDownWidth = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(comboBox, comboBox.Handle), NativeMethods.CB_GETDROPPEDWIDTH, 0, 0)); 850UnsafeNativeMethods.SendMessage(new HandleRef(comboBox, comboBox.Handle), NativeMethods.CB_SETDROPPEDWIDTH, this.DropDownWidth, 0);
winforms\Managed\System\WinForms\DataGridViewMethods.cs (24)
5767IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 5769IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone)); 5771SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT); 5772SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y + r.Height - DATAGRIDVIEW_shadowEdgeThickness, r.Width, DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT); 5773SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT); 5774SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X + r.Width - DATAGRIDVIEW_shadowEdgeThickness, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT); 5776SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, saveBrush)); 5777SafeNativeMethods.DeleteObject(new HandleRef(null, halftone)); 5778UnsafeNativeMethods.ReleaseDC(new HandleRef(this, parentHandle), new HandleRef(this, dc)); 5788IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 5790IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone)); 5791SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT); 5792SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, saveBrush)); 5793SafeNativeMethods.DeleteObject(new HandleRef(null, halftone)); 5794UnsafeNativeMethods.ReleaseDC(new HandleRef(this, parentHandle), new HandleRef(this, dc)); 26360SafeNativeMethods.ScrollWindow(new HandleRef(this, this.Handle), 26471SafeNativeMethods.ScrollWindow(new HandleRef(this, this.Handle), 0, deltaY, ref scrollArea, ref scrollArea); 29938UnsafeNativeMethods.SendMessage(new HandleRef(this, nmhdr->hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\DataObject.cs (46)
150IntPtr dcSrc = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hDC)); 151IntPtr srcOld = SafeNativeMethods.SelectObject(new HandleRef(null, dcSrc), new HandleRef(bm, hBitmap)); 155IntPtr dcDest = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hDC)); 156IntPtr hBitmapNew = SafeNativeMethods.CreateCompatibleBitmap(new HandleRef(null, hDC), bm.Size.Width, bm.Size.Height); 160IntPtr destOld = SafeNativeMethods.SelectObject(new HandleRef(null, dcDest), new HandleRef(null, hBitmapNew)); 161SafeNativeMethods.BitBlt(new HandleRef(null, dcDest), 0, 0, bm.Size.Width, bm.Size.Height, new HandleRef(null, dcSrc), 0, 0, 0x00CC0020); 165SafeNativeMethods.SelectObject(new HandleRef(null, dcSrc), new HandleRef(null, srcOld)); 166SafeNativeMethods.SelectObject(new HandleRef(null, dcDest), new HandleRef(null, destOld)); 168UnsafeNativeMethods.DeleteCompatibleDC(new HandleRef(null, dcSrc)); 169UnsafeNativeMethods.DeleteCompatibleDC(new HandleRef(null, dcDest)); 170UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 172SafeNativeMethods.DeleteObject(new HandleRef(bm, hBitmap)); 772UnsafeNativeMethods.GlobalFree(new HandleRef(medium, medium.unionmember)); 951UnsafeNativeMethods.GlobalFree(new HandleRef(null, handle)); 958IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 969UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, handle)); 1014IntPtr newHandle = UnsafeNativeMethods.GlobalReAlloc(new HandleRef(null, handle), 1020IntPtr basePtr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, newHandle)); 1065UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, newHandle)); 1082newHandle = UnsafeNativeMethods.GlobalReAlloc(new HandleRef(null, handle), 1090IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, newHandle)); 1108newHandle = UnsafeNativeMethods.GlobalReAlloc(new HandleRef(null, handle), 1116IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, newHandle)); 1125UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, newHandle)); 1139newHandle = UnsafeNativeMethods.GlobalReAlloc(new HandleRef(null, handle), 1147IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, newHandle)); 1156UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, newHandle)); 1428IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(innerData, hglobal)); 1430UnsafeNativeMethods.GlobalUnlock(new HandleRef(innerData, hglobal)); 1521UnsafeNativeMethods.GlobalFree(new HandleRef(null, hglobal)); 1644SafeNativeMethods.DeleteObject(new HandleRef(null, medium.unionmember)); 1693IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1698int size = UnsafeNativeMethods.GlobalSize(new HandleRef(null, handle)); 1730UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, handle)); 1842int count = UnsafeNativeMethods.DragQueryFile(new HandleRef(null, hdrop), unchecked((int)0xFFFFFFFF), null, 0); 1848int charlen = UnsafeNativeMethods.DragQueryFileLongPath(new HandleRef(null, hdrop), i, sb); 1875IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1885UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, handle)); 1894IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1896int size = UnsafeNativeMethods.GlobalSize(new HandleRef(null, handle)); 1902UnsafeNativeMethods.GlobalUnlock(new HandleRef(null, handle));
winforms\Managed\System\WinForms\DateTimePicker.cs (14)
418int gdt = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_GETSYSTEMTIME, 0, sys); 431UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 436UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1036UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1149UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1154UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1380UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1457UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETRANGE, flags, sa); 1574UnsafeNativeMethods.EnumChildWindows(new HandleRef(this, Handle), cb, NativeMethods.NullHandleRef); 1576SafeNativeMethods.InvalidateRect(new HandleRef(c, c.hwndFound), null, true); 1577SafeNativeMethods.UpdateWindow(new HandleRef(c, c.hwndFound)); 1638int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_EXSTYLE))); 1641UnsafeNativeMethods.SetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_EXSTYLE, new HandleRef(this, (IntPtr)style));
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (31)
692hbrushDither = SafeNativeMethods.CreatePatternBrush(new HandleRef(null, hbitmapTemp)); 697SafeNativeMethods.DeleteObject(new HandleRef(null, hbitmapTemp)); 712hfontOld = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(Parent, ((Control)Parent).FontHandle)); 717SafeNativeMethods.SetBkMode(new HandleRef(null, dc), NativeMethods.TRANSPARENT); 720SafeNativeMethods.SetBkColor(new HandleRef(null, dc), backColor); 721IntUnsafeNativeMethods.ExtTextOut(new HandleRef(null, dc), 0, 0, NativeMethods.ETO_CLIPPED | NativeMethods.ETO_OPAQUE, ref rc, null, 0, null); 725IntUnsafeNativeMethods.GetTextExtentPoint32(new HandleRef(null, dc), itemText, size); 732SafeNativeMethods.SetTextColor(new HandleRef(null, dc), textColor); 733IntUnsafeNativeMethods.DrawText(new HandleRef(null, dc), itemText, ref rc2, 736SafeNativeMethods.ImageList_Draw(new HandleRef(imagelist, imagelist.Handle), imageIndex, new HandleRef(null, dc), 745savedColor = SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(SystemColors.ControlLightLight)); 750IntUnsafeNativeMethods.ExtTextOut(new HandleRef(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null); 753IntUnsafeNativeMethods.ExtTextOut(new HandleRef(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null); 756SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(SystemColors.ControlDark)); 761IntUnsafeNativeMethods.ExtTextOut(new HandleRef(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null); 764IntUnsafeNativeMethods.ExtTextOut(new HandleRef(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null); 766SafeNativeMethods.SetBkColor(new HandleRef(null, dc), savedColor); 770SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, hfontOld)); 778itemHeight = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_GETITEMHEIGHT, 0, 0); 780UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_SETITEMHEIGHT, itemHeight, 0); 828SafeNativeMethods.DeleteObject(new HandleRef(this, hbrushDither)); 834IntPtr hbrushOld = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(this, hbrushDither)); 839oldTextColor = SafeNativeMethods.SetTextColor(new HandleRef(null, dc), ColorTranslator.ToWin32(SystemColors.ControlLightLight)); 840oldBackColor = SafeNativeMethods.SetBkColor(new HandleRef(null, dc), ColorTranslator.ToWin32(SystemColors.Control)); 842SafeNativeMethods.PatBlt(new HandleRef(null, dc), rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, NativeMethods.PATCOPY); 843SafeNativeMethods.SetTextColor(new HandleRef(null, dc), oldTextColor); 844SafeNativeMethods.SetBkColor(new HandleRef(null, dc), oldBackColor);
winforms\Managed\System\WinForms\ErrorProvider.cs (17)
923UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_ADDTOOL, 0, toolInfo); 969UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 970SafeNativeMethods.SetWindowPos(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOACTIVATE); 971UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETDELAYTIME, NativeMethods.TTDT_INITIAL, 0); 994SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), 1066IntPtr hdc = UnsafeNativeMethods.BeginPaint(new HandleRef(this, Handle), ref ps); 1074SafeNativeMethods.DrawIconEx(new HandleRef(this, mirrordc.Hdc), bounds.X - windowBounds.X, bounds.Y - windowBounds.Y, new HandleRef(provider.Region, provider.Region.IconHandle), bounds.Width, bounds.Height, 0, NativeMethods.NullHandleRef, NativeMethods.DI_NORMAL); 1082UnsafeNativeMethods.EndPaint(new HandleRef(this, Handle), ref ps); 1135UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_DELTOOL, 0, toolInfo); 1231UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETTOOLINFO, 0, toolInfo); 1258if (UnsafeNativeMethods.SetWindowRgn(new HandleRef(this, Handle), new HandleRef(windowRegion, windowRegionHandle), true) != 0) { 1274SafeNativeMethods.DeleteObject(new HandleRef(null, windowRegionHandle)); 1278SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOP, windowBounds.X, windowBounds.Y, 1280SafeNativeMethods.InvalidateRect(new HandleRef(this, Handle), null, false); 1710SafeNativeMethods.GetBitmapBits(new HandleRef(null, mask), bits.Length, bits); 1725SafeNativeMethods.DeleteObject(new HandleRef(null, mask));
winforms\Managed\System\WinForms\FileDialog.cs (10)
210int textLen = SafeNativeMethods.GetWindowTextLength(new HandleRef(this, dialogHWnd)); 212UnsafeNativeMethods.GetWindowText(new HandleRef(this, dialogHWnd), sb, sb.Capacity); 749dialogHWnd = UnsafeNativeMethods.GetParent(new HandleRef(null, hWnd)); 760int sizeNeeded = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, dialogHWnd), 1124 /*CDM_GETSPEC*/, System.IntPtr.Zero, System.IntPtr.Zero); 801UnsafeNativeMethods.SetWindowLong(new HandleRef(null, hWnd), 0, new HandleRef(null, NativeMethods.InvalidIntPtr)); 806UnsafeNativeMethods.SetWindowLong(new HandleRef(null, hWnd), 0, new HandleRef(null, NativeMethods.InvalidIntPtr)); 814UnsafeNativeMethods.EndDialog(new HandleRef(this, dialogHWnd), IntPtr.Zero); 925UnsafeNativeMethods.SetFocus(new HandleRef(null, focusHandle));
winforms\Managed\System\WinForms\FolderBrowserDialog.cs (2)
341UnsafeNativeMethods.SendMessage(new HandleRef(null, hwnd), (int) NativeMethods.BFFM_SETSELECTION, 1, selectedPath); 353UnsafeNativeMethods.SendMessage(new HandleRef(null, hwnd), (int) NativeMethods.BFFM_ENABLEOK, 0, isFileSystemFolder ? 1 : 0);
winforms\Managed\System\WinForms\FontDialog.cs (9)
477UnsafeNativeMethods.SendMessage(new HandleRef(null, hWnd), NativeMethods.WM_CHOOSEFONT_GETLOGFONT, 0, lf); 479int index = (int)UnsafeNativeMethods.SendDlgItemMessage(new HandleRef(null, hWnd), 0x473, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 481UpdateColor((int)UnsafeNativeMethods.SendDlgItemMessage(new HandleRef(null, hWnd), 0x473, 501IntPtr hWndCtl = UnsafeNativeMethods.GetDlgItem(new HandleRef(null, hWnd), NativeMethods.cmb4); 502SafeNativeMethods.ShowWindow(new HandleRef(null, hWndCtl), NativeMethods.SW_HIDE); 503hWndCtl = UnsafeNativeMethods.GetDlgItem(new HandleRef(null, hWnd), NativeMethods.stc4); 504SafeNativeMethods.ShowWindow(new HandleRef(null, hWndCtl), NativeMethods.SW_HIDE); 573UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC)); 708UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC));
winforms\Managed\System\WinForms\Form.cs (85)
1778SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.NullHandleRef, 2104int exStyle = unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE)); 2107UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE, new HandleRef(null, (IntPtr)cp.ExStyle)); 2521return new HandleRef(ownerWindow, ownerWindow.Handle); 2577SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), key, 0, 0, 0, 0, 2684UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.WM_SHOWWINDOW, value ? 1 : 0, 0); 2713SafeNativeMethods.ShowWindow(new HandleRef(this, Handle), NativeMethods.SW_SHOW); 2789SafeNativeMethods.ShowWindow(new HandleRef(this, hWnd), NativeMethods.SW_NORMAL); 2792SafeNativeMethods.ShowWindow(new HandleRef(this, hWnd), NativeMethods.SW_MAXIMIZE); 2795SafeNativeMethods.ShowWindow(new HandleRef(this, hWnd), NativeMethods.SW_MINIMIZE); 3091UnsafeNativeMethods.SetForegroundWindow(new HandleRef(this, Handle)); 3247UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_MINIMIZE, 3251UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_MINIMIZE, 3255UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_MAXIMIZE, 3259UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_MAXIMIZE, 3263UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_CLOSE, 3267UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_CLOSE, 3271UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_RESTORE, 3275UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_RESTORE, 3279UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_SIZE, 3283UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_SIZE, 3342IntPtr hmenu = UnsafeNativeMethods.GetSystemMenu(new HandleRef(this, Handle), false); 3433SafeNativeMethods.GetClientRect(new HandleRef(this, h), ref rc); 3457SafeNativeMethods.GetClientRect(new HandleRef(this, h), ref rc); 3696UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, TaskbarOwner); 4452ownerHandle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 4458UnsafeNativeMethods.GetWindowRect(new HandleRef(null, ownerHandle), ref ownerRect); 4497hWndOwner = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 5000UnsafeNativeMethods.ClientToScreen(new HandleRef(this, Handle), ptToSnap); 5117SafeNativeMethods.SetWindowPos(new HandleRef(this, HandleInternal), NativeMethods.NullHandleRef, e.SuggestedRectangle.X, e.SuggestedRectangle.Y, e.SuggestedRectangle.Width, e.SuggestedRectangle.Height, NativeMethods.SWP_NOZORDER | NativeMethods.SWP_NOACTIVATE); 5514UnsafeNativeMethods.GetWindowPlacement(new HandleRef(this, Handle), ref wp); 5533new HandleRef(this, this.Handle)); 5544etwcb.SetOwners(new HandleRef(this, this.Handle)); 5552UnsafeNativeMethods.SetWindowPlacement(new HandleRef(this, Handle), ref wp); 5767UnsafeNativeMethods.SetActiveWindow(new HandleRef(this, Handle)); 5770UnsafeNativeMethods.SetActiveWindow(new HandleRef(MdiParentInternal, MdiParentInternal.Handle)); 6091else if ( (owner != null) && ((int)UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, Control.GetSafeHandle(owner)), NativeMethods.GWL_EXSTYLE) 6107if (UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, hWndOwner), NativeMethods.GWL_HWNDPARENT) == Handle) { 6113hWndOldOwner = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 6114UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(owner, hWndOwner)); 6156else if ( (owner != null) && ((int)UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, Control.GetSafeHandle(owner)), NativeMethods.GWL_EXSTYLE) 6171UnsafeNativeMethods.SendMessage(new HandleRef(null, hWndCapture), NativeMethods.WM_CANCELMODE, IntPtr.Zero, IntPtr.Zero); 6208if (UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, hWndOwner), NativeMethods.GWL_HWNDPARENT) == Handle) { 6214hWndOldOwner = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 6215UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(owner, hWndOwner)); 6232if (!UnsafeNativeMethods.IsWindow(new HandleRef(null, hWndActive))) hWndActive = hWndOwner; 6233if (UnsafeNativeMethods.IsWindow(new HandleRef(null, hWndActive)) && SafeNativeMethods.IsWindowVisible(new HandleRef(null, hWndActive))) { 6234UnsafeNativeMethods.SetActiveWindow(new HandleRef(null, hWndActive)); 6236else if (UnsafeNativeMethods.IsWindow(new HandleRef(null, hWndOwner)) && SafeNativeMethods.IsWindowVisible(new HandleRef(null, hWndOwner))){ 6237UnsafeNativeMethods.SetActiveWindow(new HandleRef(null, hWndOwner)); 6434ownerHwnd = new HandleRef(owner, owner.Handle); 6442UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, ownerHwnd); 6458result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), 0, OpacityAsByte, NativeMethods.LWA_ALPHA); 6462result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), ColorTranslator.ToWin32(transparencyKey), 0, NativeMethods.LWA_COLORKEY); 6465result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), ColorTranslator.ToWin32(transparencyKey), 6520UnsafeNativeMethods.SetMenu(new HandleRef(this, Handle), new HandleRef(menu, menu.Handle)); 6523UnsafeNativeMethods.SetMenu(new HandleRef(this, Handle), NativeMethods.NullHandleRef); 6547UnsafeNativeMethods.SendMessage(new HandleRef(ctlClient, ctlClient.Handle), NativeMethods.WM_MDISETMENU, dummyMenu.Handle, IntPtr.Zero); 6553UnsafeNativeMethods.SendMessage(new HandleRef(ctlClient, ctlClient.Handle), NativeMethods.WM_MDISETMENU, menu.Handle, IntPtr.Zero); 6559IntPtr hMenu = UnsafeNativeMethods.GetMenu(new HandleRef(this, this.Handle)); 6565UnsafeNativeMethods.SetMenu(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef); 6582SafeNativeMethods.DrawMenuBar(new HandleRef(this, Handle)); 6700IntPtr hMenu = UnsafeNativeMethods.GetMenu(new HandleRef(this, this.Handle)); 6830SafeNativeMethods.RedrawWindow(new HandleRef(this, Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME); 6848UnsafeNativeMethods.GetWindowPlacement(new HandleRef(this, Handle), ref wp); 7260UnsafeNativeMethods.PostMessage(new HandleRef(formMdiParent, formMdiParent.Handle), NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_KEYMENU), m.WParam); 7363UnsafeNativeMethods.ScreenToClient(new HandleRef(this, this.Handle), pt ); 7754HandleRef hRef = new HandleRef(null, hWnd); 7879SafeNativeMethods.SetWindowPos(new HandleRef(window, window.Handle), NativeMethods.HWND_TOPMOST, 7884UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, owner.Width); 7886UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_SETTITLE, NativeMethods.TTI_WARNING, SR.GetString(SR.SecurityToolTipCaption)); 7888if (0 == (int)UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO())) { 7892UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_ACTIVATE, 1, 0); 7918UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(owner.Left + s.Width / 2, owner.Top + SystemInformation.CaptionHeight)); 7930UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKACTIVATE, 0, GetTOOLINFO()); 7931UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_DELTOOL, 0, GetTOOLINFO()); 7932UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO()); 7938UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(owner.Left + s.Width / 2, owner.Top + SystemInformation.CaptionHeight)); 7939UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKACTIVATE, 1, GetTOOLINFO());
winforms\Managed\System\WinForms\GroupBox.cs (1)
771SafeNativeMethods.GetClientRect(new HandleRef(this, Handle), ref rect);
winforms\Managed\System\WinForms\Help.cs (4)
224handle = new HandleRef(parent, parent.Handle); 227handle = new HandleRef(null, UnsafeNativeMethods.GetActiveWindow()); 315handle = new HandleRef(parent, parent.Handle); 318handle = new HandleRef(null, UnsafeNativeMethods.GetActiveWindow());
winforms\Managed\System\WinForms\HtmlDocument.cs (1)
832SafeNativeMethods.VariantClear(new HandleRef(null, (IntPtr)(a + VariantSize * i)));
winforms\Managed\System\WinForms\ImageList.cs (28)
312this.nativeImageList = new NativeImageList(SafeNativeMethods.ImageList_Duplicate(new HandleRef(himl, himl.Handle))); 314if(SafeNativeMethods.ImageList_GetIconSize(new HandleRef(this, this.nativeImageList.Handle), out x, out y)) { 319if(SafeNativeMethods.ImageList_GetImageInfo(new HandleRef(this, this.nativeImageList.Handle), 0, imageInfo)) { 321UnsafeNativeMethods.GetObject(new HandleRef(null, imageInfo.hbmImage), Marshal.SizeOf(bmp), bmp); 483int index = SafeNativeMethods.ImageList_ReplaceIcon(new HandleRef(this, Handle), -1, new HandleRef(icon, icon.Handle)); 499int index = SafeNativeMethods.ImageList_Add(new HandleRef(this, Handle), new HandleRef(null, hBitmap), new HandleRef(null, hMask)); 500SafeNativeMethods.DeleteObject(new HandleRef(null, hBitmap)); 501SafeNativeMethods.DeleteObject(new HandleRef(null, hMask)); 551SafeNativeMethods.ImageList_SetBkColor(new HandleRef(this, Handle), NativeMethods.CLR_NONE); 630SafeNativeMethods.ImageList_DrawEx(new HandleRef(this, Handle), index, new HandleRef(g, dc), x, y, 654UnsafeNativeMethods.CopyMemory(new HandleRef(this, destPtr), new HandleRef(this, srcPtr), Math.Abs(targetData.Stride)); 708if(SafeNativeMethods.ImageList_GetImageInfo(new HandleRef(this, this.Handle), index, imageInfo)) { 751SafeNativeMethods.ImageList_DrawEx(new HandleRef(this, Handle), index, new HandleRef(graphics, dc), 0, 0, 949SafeNativeMethods.ImageList_Destroy(new HandleRef(null, himl)); 1073return SafeNativeMethods.ImageList_GetImageCount(new HandleRef(owner, owner.Handle)); 1171bool ok = SafeNativeMethods.ImageList_Replace(new HandleRef(owner, owner.Handle), index, new HandleRef(null, hBitmap), new HandleRef(null, hMask)); 1172SafeNativeMethods.DeleteObject(new HandleRef(null, hBitmap)); 1173SafeNativeMethods.DeleteObject(new HandleRef(null, hMask)); 1424SafeNativeMethods.ImageList_Remove(new HandleRef(owner, owner.Handle), -1); 1580bool ok = SafeNativeMethods.ImageList_Remove(new HandleRef(owner, owner.Handle), index);
winforms\Managed\System\WinForms\ImageListStreamer.cs (2)
241int hResult = SafeNativeMethods.ImageList_WriteEx(new HandleRef(this, imagelistHandle), NativeMethods.ILP_DOWNLEVEL, new UnsafeNativeMethods.ComStreamFromDataStream(stream)); 248return SafeNativeMethods.ImageList_Write(new HandleRef(this, imagelistHandle), new UnsafeNativeMethods.ComStreamFromDataStream(stream));
winforms\Managed\System\WinForms\InputLanguage.cs (1)
77IntPtr handleOld = SafeNativeMethods.ActivateKeyboardLayout(new HandleRef(value, value.handle), 0);
winforms\Managed\System\WinForms\LinkLabel.cs (1)
406UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r);
winforms\Managed\System\WinForms\ListBox.cs (7)
1565UnsafeNativeMethods.GetClientRect(new HandleRef(this, Handle), ref r); 1616UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_GETTEXT, index, sb); 1708UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_GETSELITEMS, count, result); 1782UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_SETTABSTOPS, wpar, offsets); 2269UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_SETTABSTOPS, wpar, offsets); 2349SafeNativeMethods.SelectPalette(new HandleRef(null, dc), new HandleRef(null, oldPal), 0);
winforms\Managed\System\WinForms\ListView.cs (65)
446UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETBKIMAGE, 0, lvbkImage); 688int currentStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 1642UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_GETTILEVIEWINFO, 0, tileViewInfo); 1663bool retval = UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETTILEVIEWINFO, 0, tileViewInfo); 2242UnsafeNativeMethods.PostMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_ARRANGE, (int) value, 0); 2518SafeNativeMethods.SelectObject(new HandleRef(nmcd->nmcd, nmcd->nmcd.hdc), new HandleRef(odCacheFontHandleWrapper, odCacheFontHandleWrapper.Handle)); 2842SafeNativeMethods.SelectObject(new HandleRef(nmcd->nmcd, nmcd->nmcd.hdc), new HandleRef(null, odCacheFontHandle)); 2852SafeNativeMethods.SelectObject(new HandleRef(nmcd->nmcd, nmcd->nmcd.hdc), new HandleRef(odCacheFontHandleWrapper, odCacheFontHandleWrapper.Handle)); 3063UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_ENSUREVISIBLE, index, 0); 3184int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), 3286displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_FINDITEM, lastIndex - 1, ref info); 3290displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_FINDITEM, -1 /* beginning */, ref info); 3339int displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 3366int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SUBITEMHITTEST, 0, lvhi); 3379UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_GETITEMPOSITION, index, pt); 3553iItem = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SUBITEMHITTEST, 0, lvhi)); 3555iItem = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_HITTEST, 0, lvhi)); 3586IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_GETHEADER, 0, 0); 3588SafeNativeMethods.InvalidateRect(new HandleRef(this, hwndHdr), null, true); 3692return (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_INSERTCOLUMN, index, lvColumn); 3743int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,this.Handle),NativeMethods.LVM_INSERTGROUP,index,lvgroup); 3940insertIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_INSERTITEM, 0, ref lvItem); 4281int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 4283UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 4288int callbackMask = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_GETCALLBACKMASK, 0, 0)); 4290UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETCALLBACKMASK, callbackMask, 0); 4567IntPtr hdrHWND = UnsafeNativeMethods.GetWindow(new HandleRef(this, this.Handle), NativeMethods.GW_CHILD); 4587UnsafeNativeMethods.GetClientRect(new HandleRef(this, this.Handle), prc); 4594UnsafeNativeMethods.SendMessage(new HandleRef(this, hdrHWND), NativeMethods.HDM_LAYOUT, 0, ref hd); 4600SafeNativeMethods.SetWindowPos(new HandleRef(this, hdrHWND), 4601new HandleRef(this, wpos.hwndInsertAfter), 4697int retval = (int) UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), 4761int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_REMOVEGROUP, group.ID, IntPtr.Zero); 4771UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SCROLL, 0, scrollY); 4826UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETBKIMAGE, 0, lvbkImage); 4895int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETCOLUMN, ch.Index, lvColumn); 4981UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETCOLUMNORDERARRAY, orderedColumns.Length, orderedColumns); 5045IntPtr oldHandle = UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 5046UnsafeNativeMethods.DestroyWindow(new HandleRef(null, oldHandle)); 5058UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEM, 0, ref lvItem); 5071UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEM, 0, ref lvItem); 5086UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEMPOSITION32, index, pt); 5100UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEMSTATE, index, ref lvItem); 5120int colWidth = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_GETCOLUMNWIDTH, 0, 0)); 5142UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEMTEXT, itemIndex, ref lvItem); 5180UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SORTITEMS, IntPtr.Zero, callback); 5313int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), 5352bool retval = UnsafeNativeMethods.SendMessage(new HandleRef(this,Handle),NativeMethods.LVM_SETTILEVIEWINFO,0,tileViewInfo); 5369int displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 5399int displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 5478Color foreColor = ColorTranslator.FromWin32(SafeNativeMethods.GetTextColor(new HandleRef(this, nmcd->hdc))); 5479Color backColor = ColorTranslator.FromWin32(SafeNativeMethods.GetBkColor(new HandleRef(this, nmcd->hdc))); 5774IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_GETHEADER, 0, 0); 5775IntPtr hFont = UnsafeNativeMethods.SendMessage(new HandleRef(this, hwndHdr), NativeMethods.WM_GETFONT, 0, 0); 5791return (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 6150UnsafeNativeMethods.SendMessage(new HandleRef(this, nmhdr->hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 8984UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_GETITEM, 0, ref lvItem); 9003int nextSelected = (int)UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_GETNEXTITEM, -1, NativeMethods.LVNI_SELECTED); 9013nextSelected = (int)UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_GETNEXTITEM, nextSelected, NativeMethods.LVNI_SELECTED); 9025UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_DELETEALLITEMS, 0, 0);
winforms\Managed\System\WinForms\ListViewInsertionMark.cs (2)
127UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_INSERTMARKHITTEST, point, lvInsertMark); 137UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_SETINSERTMARK, 0, lvInsertMark);
winforms\Managed\System\WinForms\ListViewItem.cs (3)
962UnsafeNativeMethods.SendMessage(new HandleRef(lv, lv.Handle), NativeMethods.LVM_EDITLABEL, Index, 0); 1165UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_SETITEM, 0, ref lvItem); 1193UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_GETITEM, 0, ref lvItem);
winforms\Managed\System\WinForms\MaskedTextBox.cs (4)
1201HandleRef handle = new HandleRef(this, this.Handle); 1208UnsafeNativeMethods.ImmNotifyIME(new HandleRef(null, inputContext), NativeMethods.NI_COMPOSITIONSTR, action, 0); 1212UnsafeNativeMethods.ImmReleaseContext(handle, new HandleRef(null, inputContext)); 2007SafeNativeMethods.RedrawWindow(new HandleRef(this, this.Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME);
winforms\Managed\System\WinForms\MDIClient.cs (9)
260UnsafeNativeMethods.GetWindowPlacement(new HandleRef(child, child.Handle), ref wp); 271UnsafeNativeMethods.SetWindowPlacement(new HandleRef(child, child.Handle), ref wp); 306if (SafeNativeMethods.CombineRgn(new HandleRef(null, rgn1), new HandleRef(null, rgn1), new HandleRef(null, rgn2), NativeMethods.RGN_DIFF) == 0) 309if (UnsafeNativeMethods.SetWindowRgn(new HandleRef(this, Handle), new HandleRef(null, rgn1), true) == 0) { 319SafeNativeMethods.DeleteObject(new HandleRef(null, rgn2)); 325SafeNativeMethods.DeleteObject(new HandleRef(null, rgn1));
winforms\Managed\System\WinForms\MDIControlStrip.cs (4)
36IntPtr hMenu= UnsafeNativeMethods.GetSystemMenu(new HandleRef(this, Control.GetSafeHandle(target)), /*bRevert=*/false); 131IntPtr hIcon = UnsafeNativeMethods.SendMessage(new HandleRef(this, Control.GetSafeHandle(target)), NativeMethods.WM_GETICON, NativeMethods.ICON_SMALL, 0); 167IntPtr hMenu= UnsafeNativeMethods.GetSystemMenu(new HandleRef(this, Control.GetSafeHandle(target)), /*bRevert=*/false); 185system.DropDown = ToolStripDropDownMenu.FromHMenu(UnsafeNativeMethods.GetSystemMenu(new HandleRef(this, Control.GetSafeHandle(target)), /*bRevert=*/false), target);
winforms\Managed\System\WinForms\Menu.cs (4)
217UnsafeNativeMethods.DestroyMenu(new HandleRef(this, handle)); 282while (UnsafeNativeMethods.GetMenuItemCount(new HandleRef(this, handle)) > 0) { 283UnsafeNativeMethods.RemoveMenu(new HandleRef(this, handle), 0, NativeMethods.MF_BYPOSITION); 313UnsafeNativeMethods.DestroyMenu(new HandleRef(this, handle));
winforms\Managed\System\WinForms\MenuItem.cs (13)
267UnsafeNativeMethods.SetMenuDefaultItem(new HandleRef(menu, menu.handle), MenuID, false); 270UnsafeNativeMethods.SetMenuDefaultItem(new HandleRef(menu, menu.handle), -1, false); 453UnsafeNativeMethods.GetMenuItemInfo(new HandleRef(menu, menu.handle), MenuID, false, info); 473int count = UnsafeNativeMethods.GetMenuItemCount(new HandleRef(menu, menu.Handle)); 480UnsafeNativeMethods.GetMenuItemInfo(new HandleRef(menu, menu.handle), i, true, info); 857UnsafeNativeMethods.InsertMenuItem(new HandleRef(menu, menu.handle), -1, true, info); 1433UnsafeNativeMethods.GetMenuItemInfo(new HandleRef(menu, menu.handle), MenuID, false, info); 1439UnsafeNativeMethods.SetMenuItemInfo(new HandleRef(menu, menu.handle), MenuID, false, info); 1461UnsafeNativeMethods.SetMenuItemInfo(new HandleRef(menu, menu.handle), MenuID, false, info); 1478SafeNativeMethods.DrawMenuBar(new HandleRef(f, f.Handle)); 1506SafeNativeMethods.SelectPalette(new HandleRef(null, dis.hDC), new HandleRef(null, oldPal), 0); 1534UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screendc));
winforms\Managed\System\WinForms\MessageBox.cs (2)
484result = Win32ToDialogResult(SafeNativeMethods.MessageBox(new HandleRef(owner, handle), text, caption, style)); 495UnsafeNativeMethods.SendMessage(new HandleRef(owner, handle), NativeMethods.WM_SETFOCUS, 0, 0);
winforms\Managed\System\WinForms\MonthCalendar.cs (7)
1059int res = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_GETTODAY, 0, st); 1525UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_GETMONTHRANGE, flag, sa); 1575UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_HITTEST, 0, mchi); 1637UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETTODAY, 0, st); 2027if ((int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETRANGE, flag, sa) == 0) 2163UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETSELRANGE , 0, sa); 2263UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETTODAY, 0, st);
winforms\Managed\System\WinForms\NativeMethods.cs (7)
62public static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 667public static HandleRef HWND_TOP = new HandleRef(null, (IntPtr)0); 669public static HandleRef HWND_BOTTOM = new HandleRef(null, (IntPtr)1); 671public static HandleRef HWND_TOPMOST = new HandleRef(null, new IntPtr(-1)); 673public static HandleRef HWND_NOTOPMOST = new HandleRef(null, new IntPtr(-2)); 675public static HandleRef HWND_MESSAGE = new HandleRef(null, new IntPtr(-3)); 2732hicon = SafeNativeMethods.CopyImage(new HandleRef(icon, icon.Handle), NativeMethods.IMAGE_ICON, icon.Size.Width, icon.Size.Height, 0);
winforms\Managed\System\WinForms\NativeWindow.cs (32)
174if (UnsafeNativeMethods.IsWindow(new HandleRef(null, handle))) { 176int id = SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(null, handle), out lpdwProcessId); 182SafeNativeMethods.GetExitCodeThread(new HandleRef(null, threadHandle), out exitCode); 185if (UnsafeNativeMethods.SendMessageTimeout(new HandleRef(null, handle), 204UnsafeNativeMethods.PostMessage(new HandleRef(this, h), NativeMethods.WM_CLOSE, 0, 0); 455UnsafeNativeMethods.SetWindowLong(new HandleRef(wrapper, handle), NativeMethods.GWL_ID, new HandleRef(wrapper, (IntPtr)globalID)); 607userDefWindowProc = UnsafeNativeMethods.GetProcAddress(new HandleRef(null, UnsafeNativeMethods.GetModuleHandle("user32.dll")), defproc); 613defWindowProc = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 628UnsafeNativeMethods.SetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC, windowProc); 629windowProcPtr = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 632(unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_STYLE))) & NativeMethods.WS_CHILD) != 0 && 633unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_ID))) == 0) { 634UnsafeNativeMethods.SetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_ID, new HandleRef(this, handle)); 764cp.Caption, cp.Style, cp.X, cp.Y, cp.Width, cp.Height, new HandleRef(cp, cp.Parent), NativeMethods.NullHandleRef, 765new HandleRef(null, modHandle), cp.Param); 855if (!UnsafeNativeMethods.DestroyWindow(new HandleRef(this, handle))) { 858UnsafeNativeMethods.PostMessage(new HandleRef(this, handle), NativeMethods.WM_CLOSE, 0, 0); 1085HandleRef href = new HandleRef(b, b.handle); 1086UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new HandleRef(null, userDefWindowProc)); 1361HandleRef href = new HandleRef(this, handle); 1365IntPtr currentWinPrc = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 1377UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new HandleRef(this, defWindowProc)); 1391UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new HandleRef(this, userDefWindowProc)); 1417UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new HandleRef(this, userDefWindowProc)); 1492UnsafeNativeMethods.SetWindowLong(new HandleRef(null, hWnd), NativeMethods.GWL_WNDPROC, new HandleRef(this, defWindowProc)); 1575userDefWindowProc = UnsafeNativeMethods.GetProcAddress(new HandleRef(null, UnsafeNativeMethods.GetModuleHandle("user32.dll")), defproc); 1635bool ok = UnsafeNativeMethods.GetClassInfo(new HandleRef(null, UnsafeNativeMethods.GetModuleHandle(null)), windowClassName, wcls); 1645if (UnsafeNativeMethods.UnregisterClass(windowClassName, new HandleRef(null, UnsafeNativeMethods.GetModuleHandle(null)))) { 1679if (registered && UnsafeNativeMethods.UnregisterClass(windowClassName, new HandleRef(null, UnsafeNativeMethods.GetModuleHandle(null)))) {
winforms\Managed\System\WinForms\NotifyIcon.cs (6)
485UnsafeNativeMethods.PostMessage(new HandleRef(window, window.Handle), NativeMethods.WM_CLOSE, 0, 0); 729UnsafeNativeMethods.SetForegroundWindow(new HandleRef(window, window.Handle)); 734SafeNativeMethods.TrackPopupMenuEx(new HandleRef(contextMenu, contextMenu.Handle), 738new HandleRef(window, window.Handle), 742UnsafeNativeMethods.PostMessage(new HandleRef(window, window.Handle), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero); 1006UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_CLOSE, 0, 0);
winforms\Managed\System\WinForms\PaintEvent.cs (2)
170SafeNativeMethods.SelectPalette(new HandleRef(this, dc), new HandleRef(this, oldPal), 0);
winforms\Managed\System\WinForms\Printing\PageSetupDialog.cs (2)
428UnsafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 429UnsafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames));
winforms\Managed\System\WinForms\Printing\PrintDialog.cs (5)
450UnsafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 451UnsafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 551UnsafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevMode)); 553UnsafeNativeMethods.GlobalFree(new HandleRef(data, data.hDevNames)); 555UnsafeNativeMethods.GlobalFree(new HandleRef(data, data.pageRanges));
winforms\Managed\System\WinForms\Printing\PrintPreviewControl.cs (8)
369if (SafeNativeMethods.GetScrollInfo(new HandleRef(this, m.HWnd), direction, si)) 427screendpi = new Point(UnsafeNativeMethods.GetDeviceCaps(new HandleRef(tempGraphics, dc), NativeMethods.LOGPIXELSX), 428UnsafeNativeMethods.GetDeviceCaps(new HandleRef(tempGraphics, dc), NativeMethods.LOGPIXELSY)); 750SafeNativeMethods.ScrollWindow(new HandleRef(this, Handle), 756UnsafeNativeMethods.SetScrollPos(new HandleRef(this, Handle), NativeMethods.SB_HORZ, position.X, true); 757UnsafeNativeMethods.SetScrollPos(new HandleRef(this, Handle), NativeMethods.SB_VERT, position.Y, true); 769UnsafeNativeMethods.SetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_VERT, info, true); 775UnsafeNativeMethods.SetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_HORZ, info, true);
winforms\Managed\System\WinForms\ProgressBar.cs (6)
453UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 462UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 788UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 789UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 893UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 894UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor));
winforms\Managed\System\WinForms\PropertyGrid.cs (4)
3840IntPtr hWndParent = UnsafeNativeMethods.GetParent(new HandleRef(this, Handle)); 3842UnsafeNativeMethods.SetFocus(new HandleRef(null, hWndParent)); 4665UnsafeNativeMethods.MapWindowPoints(new HandleRef(child, child.Handle), new HandleRef(this, Handle), temp, 1);
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (9)
2208oldTextColor = SafeNativeMethods.SetTextColor(new HandleRef(g, hdc), SafeNativeMethods.RGBToCOLORREF(textColor.ToArgb())); 2209oldBkColor = SafeNativeMethods.SetBkColor(new HandleRef(g, hdc), SafeNativeMethods.RGBToCOLORREF(bkColor.ToArgb())); 2210hfont = SafeNativeMethods.SelectObject(new HandleRef(g, hdc), new HandleRef(null, hfont)); 2231IntUnsafeNativeMethods.DrawText(new HandleRef(g, hdc), strValue, ref lpRect, format); 2234SafeNativeMethods.SetTextColor(new HandleRef(g, hdc), oldTextColor); 2235SafeNativeMethods.SetBkColor(new HandleRef(g, hdc), oldBkColor); 2236hfont = SafeNativeMethods.SelectObject(new HandleRef(g, hdc), new HandleRef(null, hfont));
winforms\Managed\System\WinForms\PropertyGridInternal\GridToolTip.cs (6)
89UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_UPDATETIPTEXT, 0, GetTOOLINFO(controls[i])); 160UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_DELTOOL, 0, GetTOOLINFO((Control)sender)); 204SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOPMOST, 209if (0 == (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO(c))) { 216UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 230if (0 == (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_UPDATETIPTEXT, 0, GetTOOLINFO(controls[i]))) {
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (36)
420int exStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(edit, edit.Handle), NativeMethods.GWL_EXSTYLE))); 791UnsafeNativeMethods.ClientToScreen(new HandleRef(this, Handle), pt); 998gotfocus = IntPtr.Zero != UnsafeNativeMethods.SetFocus(new HandleRef(this, Handle)); 1663SafeNativeMethods.SetWindowPos(new HandleRef(this.dropDownHolder, this.dropDownHolder.Handle), NativeMethods.NullHandleRef, loc.X, loc.Y, size.Width, size.Height, flags); 1691UnsafeNativeMethods.SetWindowLong(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(this, Handle)); 1706SafeNativeMethods.ShowWindow(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.SW_SHOWNA); 1735UnsafeNativeMethods.SetWindowLong(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(this, Handle)); 1737SafeNativeMethods.ShowWindow(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.SW_SHOWNA); 2765hwnd != IntPtr.Zero; hwnd = UnsafeNativeMethods.GetParent(new HandleRef(null, hwnd))) { 3280if (UnsafeNativeMethods.IsChild(new HandleRef(null, foregroundWindow), new HandleRef(null, this.Handle))) { 3659SafeNativeMethods.ExternalDeleteObject(new HandleRef(this, baseHfont)); 3663SafeNativeMethods.ExternalDeleteObject(new HandleRef(this, boldHfont)); 3870IntPtr hdc = UnsafeNativeMethods.GetDC(new HandleRef(DropDownListBox, DropDownListBox.Handle)); 3876hFont = SafeNativeMethods.SelectObject(new HandleRef(DropDownListBox, hdc), new HandleRef(Font, hFont)); 3886IntUnsafeNativeMethods.GetTextExtentPoint32(new HandleRef(DropDownListBox, hdc), s, textSize); 3890SafeNativeMethods.GetTextMetrics(new HandleRef(DropDownListBox, hdc), ref tm); 3895hFont = SafeNativeMethods.SelectObject(new HandleRef(DropDownListBox, hdc), new HandleRef(Font, hFont)); 3898SafeNativeMethods.DeleteObject(new HandleRef(Font, hFont)); 3899UnsafeNativeMethods.ReleaseDC(new HandleRef(DropDownListBox, DropDownListBox.Handle), new HandleRef(DropDownListBox, hdc)); 4945UnsafeNativeMethods.SetFocus(new HandleRef(null, priorFocus)); 5346UnsafeNativeMethods.PostMessage(new HandleRef(Edit, Edit.Handle), NativeMethods.WM_IME_STARTCOMPOSITION, 0, 0); 5351UnsafeNativeMethods.PostMessage(new HandleRef(Edit, Edit.Handle), NativeMethods.WM_IME_COMPOSITION, m.WParam, m.LParam); 5683hWnd = UnsafeNativeMethods.GetWindowLong(new HandleRef(null, hWnd), NativeMethods.GWL_HWNDPARENT); 6104(int) UnsafeNativeMethods.GetDpiForWindow(new HandleRef(this, HandleInternal)); 6650UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_CHAR, (IntPtr)keyChar, IntPtr.Zero); 7149SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(control, control.Handle), out thisProcessID); 7192return UnsafeNativeMethods.CallNextHookEx(new HandleRef(this, mouseHookHandle), nCode, wparam, lparam); 7205UnsafeNativeMethods.UnhookWindowsHookEx(new HandleRef(this, mouseHookHandle)); 7239SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(null, hWndAtPoint), out pid); 7740UnsafeNativeMethods.ScreenToClient(new HandleRef(Owner, Owner.Handle), pt);
winforms\Managed\System\WinForms\RichTextBox.cs (53)
377StringBuilder pathBuilder = UnsafeNativeMethods.GetModuleFileNameLongPath(new HandleRef(null, moduleHandle)); 526if (SafeNativeMethods.GetWindowTextLength(new HandleRef(this, Handle)) > 0) { 597opt = (RichTextBoxLanguageOptions)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETLANGOPTIONS, 0, 0); 610UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETLANGOPTIONS, 0, (int) value); 718IntPtr hDC = UnsafeNativeMethods.CreateIC("DISPLAY", null, null, new HandleRef(null, IntPtr.Zero)); 724UnsafeNativeMethods.DeleteDC(new HandleRef(null, hDC)); 832UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 879UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 903UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 933UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 981UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf); 1016UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf); 1067UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf2); 1114UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 1130UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 1155UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 1171UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 1284UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 1302UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 1324UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 1346UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETPARAFORMAT, 0, pf); 1354UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETPARAFORMAT, 0, pf); 1518return unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETTEXTLENGTHEX, gtl, 0 /*ignored*/)); 2027position = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_FINDTEXT, findOptions, ft); 2065UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_EXSETSEL, 0, chrg); 2113int textLen = SafeNativeMethods.GetWindowTextLength(new HandleRef(this, Handle)); 2170len = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETTEXTRANGE, 0, txrg); 2247UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETCHARFORMAT, fSelection ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_DEFAULT, cf); 2253UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETCHARFORMAT, fSelection ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_DEFAULT, cf2); 2324int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_CHARFROMPOS, 0, wpt); 2378UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_POSFROMCHAR, pt, index); 2604UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETOPTIONS, (IntPtr)RichTextBoxConstants.ECOOP_OR, 2720UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_PASTESPECIAL, clipFormat.Id, rps); 2873return IntPtr.Zero != UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf); 2879return IntPtr.Zero != UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, charRange, cf); 2912UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, selectionOnly ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_ALL, cfA); 2926UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, selectionOnly ? RichTextBoxConstants.SCF_SELECTION : RichTextBoxConstants.SCF_ALL, cfW); 2953logPixelsX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSX); 2954logPixelsY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSY); 2956UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 3017UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_EXSETSEL, 0, cr); 3068UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_STREAMIN, flags, es64); 3074UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_STREAMIN, flags, es); 3165UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_STREAMOUT, flags, es64); 3171UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_STREAMOUT, flags, es); 3282UnsafeNativeMethods.SendCallbackMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETOLECALLBACK, IntPtr.Zero, pRichEditOleCallback); 3291UnsafeNativeMethods.DragAcceptFiles(new HandleRef(this, Handle), false); 3383int len = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETTEXTRANGE, 0, txrg); 3446if (UnsafeNativeMethods.DragQueryFileLongPath(new HandleRef(endropfiles, endropfiles.hDrop), 0, path) != 0) 3622int textLength = SafeNativeMethods.GetWindowTextLength(new HandleRef(this, Handle)); 3627UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.EM_SETSEL, selEnd - 1, selEnd); 3692UnsafeNativeMethods.SetCursor(new HandleRef(Cursors.Hand, Cursors.Hand.Handle)); 3831int hr = UnsafeNativeMethods.ReadClassStg(new HandleRef(null, lpstg), ref realClsid);
winforms\Managed\System\WinForms\Screen.cs (6)
91SafeNativeMethods.GetMonitorInfo(new HandleRef(null, monitor), info); 104this.bitDepth = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, screenDC), NativeMethods.BITSPIXEL); 105this.bitDepth *= UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, screenDC), NativeMethods.PLANES); 108UnsafeNativeMethods.DeleteDC(new HandleRef(null, screenDC)); 248SafeNativeMethods.GetMonitorInfo(new HandleRef(null, hmonitor), info); 364return new Screen(SafeNativeMethods.MonitorFromWindow(new HandleRef(null, hwnd), MONITOR_DEFAULTTONEAREST));
winforms\Managed\System\WinForms\ScrollableControl.cs (2)
878SafeNativeMethods.ScrollWindowEx(new HandleRef(this, Handle), xDelta, yDelta, 991SafeNativeMethods.GetScrollInfo(new HandleRef(this, Handle), fnBar, si);
winforms\Managed\System\WinForms\ScrollBar.cs (2)
810UnsafeNativeMethods.SetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_CTL, si, true); 895SafeNativeMethods.GetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_CTL, si);
winforms\Managed\System\WinForms\ScrollProperties.cs (3)
321UnsafeNativeMethods.SetScrollInfo(new HandleRef(parent, parent.Handle), Orientation, si, true); 333UnsafeNativeMethods.EnableScrollBar(new HandleRef(parent, parent.Handle), Orientation, NativeMethods.ESB_ENABLE_BOTH); 336UnsafeNativeMethods.EnableScrollBar(new HandleRef(parent, parent.Handle), Orientation, NativeMethods.ESB_DISABLE_BOTH);
winforms\Managed\System\WinForms\SendKeys.cs (5)
240new HandleRef(null, UnsafeNativeMethods.GetModuleHandle(null)), 257new HandleRef(null, UnsafeNativeMethods.GetModuleHandle(null)), 264UnsafeNativeMethods.UnhookWindowsHookEx(new HandleRef(null, hookHandle)); 979UnsafeNativeMethods.UnhookWindowsHookEx(new HandleRef(null, hhook)); 1101UnsafeNativeMethods.CallNextHookEx(new HandleRef(null, SendKeys.hhook), code, wparam, lparam);
winforms\Managed\System\WinForms\SplitContainer.cs (10)
589UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 1636IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 1638IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone)); 1639SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT); 1640SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, saveBrush)); 1641SafeNativeMethods.DeleteObject(new HandleRef(null, halftone)); 1642UnsafeNativeMethods.ReleaseDC(new HandleRef(this, parentHandle), new HandleRef(null, dc));
winforms\Managed\System\WinForms\Splitter.cs (9)
773IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(ParentInternal, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 775IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(ParentInternal, dc), new HandleRef(null, halftone)); 776SafeNativeMethods.PatBlt(new HandleRef(ParentInternal, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT); 777SafeNativeMethods.SelectObject(new HandleRef(ParentInternal, dc), new HandleRef(null, saveBrush)); 778SafeNativeMethods.DeleteObject(new HandleRef(null, halftone)); 779UnsafeNativeMethods.ReleaseDC(new HandleRef(ParentInternal, parentHandle), new HandleRef(null, dc));
winforms\Managed\System\WinForms\StatusBar.cs (8)
602UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.SB_SETPARTS, 1, offsets); 616UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.SB_SETPARTS, length, offsets2); 1783ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(p.MainToolTip, p.MainToolTip.Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO(tool)); 1786ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO(tool)); 1795UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_DELTOOL, 0, GetMinTOOLINFO(tool)); 1800UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTOOLINFO, 0, GetTOOLINFO(tool)); 1815SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOPMOST, 1823UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\StatusBarPanel.cs (2)
643int result = (int) UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.Handle), NativeMethods.SB_SETTEXT, (IntPtr)wparam, sendText); 657result = (int) UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.Handle), NativeMethods.SB_GETRECT, (IntPtr)GetIndex(), ref rect);
winforms\Managed\System\WinForms\StatusStrip.cs (1)
581UnsafeNativeMethods.MapWindowPoints(new HandleRef(this, this.Handle), rootHwnd, gripLocation, 1);
winforms\Managed\System\WinForms\SystemInformation.cs (2)
137int lines = (int)UnsafeNativeMethods.SendMessage(new HandleRef(null, hWndMouseWheel), message, 0, 0); 1135if (UnsafeNativeMethods.GetUserObjectInformation(new HandleRef(null, hwinsta), NativeMethods.UOI_FLAGS, flags, Marshal.SizeOf(flags), ref lengthNeeded)) {
winforms\Managed\System\WinForms\TabControl.cs (12)
1066int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_INSERTITEM, tabPageCount + 1, tcitem); 1067UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), tabBaseReLayoutMessage, IntPtr.Zero, IntPtr.Zero); 1309retIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_INSERTITEM, index, tcitem); 1362SafeNativeMethods.SetWindowPos(new HandleRef(this, tooltipHwnd), 1738UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TCM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 1751UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_SETITEM, index, tcitem); 1754UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_SETCURSEL, (IntPtr)index, IntPtr.Zero); 2061SafeNativeMethods.SelectPalette(new HandleRef(null, dis.hDC), new HandleRef(null, oldPal), 0); 2136while (UnsafeNativeMethods.PeekMessage(ref msg, new HandleRef(this, hwnd), 2205UnsafeNativeMethods.SendMessage(new HandleRef(nmhdr, nmhdr.hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\TextBox.cs (4)
608SafeNativeMethods.RedrawWindow(new HandleRef(this, this.Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME); 786if (!stringSource.Bind(new HandleRef(this, Handle), (int)AutoCompleteMode)) 813int ret = SafeNativeMethods.SHAutoComplete(new HandleRef(this, Handle) , (int)AutoCompleteSource | mode); 835SafeNativeMethods.SHAutoComplete(new HandleRef(this, Handle) , mode);
winforms\Managed\System\WinForms\TextBoxBase.cs (6)
1013UnsafeNativeMethods.SendMessage( new HandleRef( this, Handle ), NativeMethods.EM_GETSEL, ref start, ref end ); 1258return SafeNativeMethods.GetWindowTextLength(new HandleRef(this, Handle)); 1318UnsafeNativeMethods.SetWindowText(new HandleRef(this, Handle), value); 1756int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_CHARFROMPOS, 0, longPoint); 1795int i = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_POSFROMCHAR, index, 0); 1836if (UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_GETOLEINTERFACE, 0, out editOle) != 0) {
winforms\Managed\System\WinForms\Timer.cs (5)
347int hwndThread = SafeNativeMethods.GetWindowThreadProcessId(new HandleRef(this, hWnd), out pid); 367_timerID = (int) SafeNativeMethods.SetTimer(new HandleRef(this, Handle), TimerID++, interval, IntPtr.Zero); 392UnsafeNativeMethods.PostMessage(new HandleRef(this, hWnd), NativeMethods.WM_CLOSE, 0, 0); 399if (_stoppingTimer || hWnd == IntPtr.Zero || !UnsafeNativeMethods.IsWindow(new HandleRef(this, hWnd))) { 409SafeNativeMethods.KillTimer(new HandleRef(this, hWnd), _timerID);
winforms\Managed\System\WinForms\ToolBar.cs (11)
1149UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TB_SETBUTTONINFO, x, ref tbbi); 1200UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TB_INSERTBUTTON, index, ref tbbutton); 1237UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TB_SETBUTTONINFO, index, ref tbbi); 1494UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TB_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 1556UnsafeNativeMethods.MapWindowPoints(new HandleRef(nmTB.hdr, nmTB.hdr.hwndFrom), NativeMethods.NullHandleRef, ref rc, 2); 1564new HandleRef(menu, menu.Handle), 1569new HandleRef(this, Handle), tpm); 1707int nRet = UnsafeNativeMethods.GetWindowPlacement(new HandleRef(null, note.hwndFrom), ref wndPlacement); 1733UnsafeNativeMethods.ClientToScreen(new HandleRef(this, this.Handle), leftTop); 1753SafeNativeMethods.SetWindowPos(new HandleRef(null, note.hwndFrom), NativeMethods.NullHandleRef, leftTop.x, leftTop.y, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOZORDER | NativeMethods.SWP_NOACTIVATE);
winforms\Managed\System\WinForms\ToolBarButton.cs (2)
335UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.Handle), NativeMethods.TB_GETRECT, FindButtonIndex(), ref rc); 559int buttonID = (int)UnsafeNativeMethods.SendMessage(new HandleRef(Parent, Parent.Handle), NativeMethods.TB_GETBUTTONINFO, commandId, ref button);
winforms\Managed\System\WinForms\ToolStrip.cs (12)
2843UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.WM_PRINT, (IntPtr)imageHdc, 2848SafeNativeMethods.BitBlt(new HandleRef(this, desthDC), bounds.X, bounds.Y, bounds.Width, bounds.Height, 2849new HandleRef(g, imageHdc), 0, 0, NativeMethods.SRCCOPY); 4530HandleRef thisHandle = new HandleRef(this, this.Handle); 4531HandleRef otherHandle = new HandleRef(null, otherHwnd); 4720IntPtr hwndClicked = UnsafeNativeMethods.ChildWindowFromPointEx(new HandleRef(null, Handle), pt.X, pt.Y,(int)(GetChildAtPointSkip.Invisible | GetChildAtPointSkip.Disabled | GetChildAtPointSkip.Transparent)); 5165if (!UnsafeNativeMethods.IsChild(new HandleRef(this, ownerToolStrip.Handle), new HandleRef(this,m.HWnd))) { 5167if (rootHwnd.Handle == m.HWnd || UnsafeNativeMethods.IsChild(rootHwnd, new HandleRef(this,m.HWnd))) { 5232cachedItemHDC = new HandleRef(this, compatibleHDC); 5236cachedItemBitmap = new HandleRef(this, SafeNativeMethods.CreateCompatibleBitmap(toolStripHDC, bitmapSize.Width, bitmapSize.Height)); 5242SafeNativeMethods.ExternalDeleteObject(new HandleRef(null, oldBitmap));
winforms\Managed\System\WinForms\ToolStripDropDown.cs (7)
1103SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), topMostFlag, 0, 0, 0, 0, 1672UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, ToolStripManager.ModalMenuFilter.ActiveHwnd); 1679HandleRef ownerHandle = new HandleRef(ownerWindow, ownerWindow.Handle); 1680UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, ownerHandle); 1841else if (IsHandleCreated && SafeNativeMethods.IsWindowEnabled(new HandleRef(this, Handle))) { 1842SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0, 2022result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), 0, OpacityAsByte, NativeMethods.LWA_ALPHA);
winforms\Managed\System\WinForms\ToolStripDropDownMenu.cs (1)
280HandleRef menuHandle = new HandleRef(null, hmenu);
winforms\Managed\System\WinForms\ToolStripDropTargetManager.cs (2)
260int n = UnsafeNativeMethods.RegisterDragDrop(new HandleRef(owner, owner.Handle), (UnsafeNativeMethods.IOleDropTarget)(new DropTarget(this))); 276int n = UnsafeNativeMethods.RevokeDragDrop(new HandleRef(owner, owner.Handle));
winforms\Managed\System\WinForms\ToolStripManager.cs (15)
854ActiveHwndInternal = new HandleRef(this, hwndActive); 979ActiveHwndInternal = new HandleRef(this, topLevel.Handle); 1050UnsafeNativeMethods.MapWindowPoints(new HandleRef(activeToolStrip, hwndMouseMessageIsFrom), new HandleRef(activeToolStrip, activeToolStrip.Handle), pt, 1); 1126ActiveHwndInternal = new HandleRef(this, hwndActive); 1246HandleRef hwndActiveToolStrip = new HandleRef(activeToolStrip, activeToolStrip.Handle); 1247HandleRef hwndCurrentActiveWindow = new HandleRef(null, UnsafeNativeMethods.GetActiveWindow()); 1286if (!IsChildOrSameWindow(hwndActiveToolStrip, new HandleRef(null, m.HWnd))) { 1292&& (IsChildOrSameWindow(new HandleRef(toplevelToolStrip, toplevelToolStrip.Handle), 1293new HandleRef(null, m.HWnd)))) { 1301else if (!IsChildOrSameWindow(ActiveHwnd, new HandleRef(null, m.HWnd))) { 1414new HandleRef(null, IntPtr.Zero), 1440return UnsafeNativeMethods.CallNextHookEx(new HandleRef(this, messageHookHandle), nCode, wparam, lparam); 1446UnsafeNativeMethods.UnhookWindowsHookEx(new HandleRef(this, messageHookHandle)); 1709IntPtr hMenu = UnsafeNativeMethods.GetMenu(new HandleRef(toplevelControl, toplevelControl.Handle));
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (6)
712UnsafeNativeMethods.GetMenuItemInfo(new HandleRef(this, nativeMenuHandle), nativeMenuCommandID, /*fByPosition instead of ID=*/ false, info); 732UnsafeNativeMethods.GetMenuItemInfo(new HandleRef(this, nativeMenuHandle), nativeMenuCommandID, /*fByPosition instead of ID=*/ false, info); 743UnsafeNativeMethods.GetMenuItemInfo(new HandleRef(this, nativeMenuHandle), nativeMenuCommandID, /*fByPosition instead of ID=*/ false, info); 776UnsafeNativeMethods.GetMenuItemInfo(new HandleRef(this, nativeMenuHandle), nativeMenuCommandID, /*fByPosition instead of ID=*/ false, info); 877UnsafeNativeMethods.PostMessage( new HandleRef(this, targetWindowHandle), NativeMethods.WM_SYSCOMMAND,nativeMenuCommandID, 0); 883UnsafeNativeMethods.PostMessage( new HandleRef(this, targetWindowHandle), NativeMethods.WM_COMMAND, nativeMenuCommandID, 0);
winforms\Managed\System\WinForms\ToolStripPanel.cs (2)
858while (UnsafeNativeMethods.PeekMessage(ref msg, new HandleRef(this, IntPtr.Zero), 861SafeNativeMethods.UpdateWindow(new HandleRef(null, msg.hwnd));
winforms\Managed\System\WinForms\ToolStripTextBox.cs (8)
648UnsafeNativeMethods.GetClientRect(new HandleRef(this, this.Handle), ref rect); 727hTotalRegion = new HandleRef(this, SafeNativeMethods.CreateRectRgn(0, 0, this.Width, this.Height)); 728hClientRegion = new HandleRef(this, SafeNativeMethods.CreateRectRgn(absoluteClientRectangle.left, absoluteClientRectangle.top, absoluteClientRectangle.right, absoluteClientRectangle.bottom)); 729hNonClientRegion = new HandleRef(this, SafeNativeMethods.CreateRectRgn(0,0,0,0)); 735SafeNativeMethods.RedrawWindow(new HandleRef(this, Handle), 852HandleRef hdc = new HandleRef(this, UnsafeNativeMethods.GetWindowDC(new HandleRef(this,m.HWnd))); 887UnsafeNativeMethods.ReleaseDC(new HandleRef(this, this.Handle),hdc);
winforms\Managed\System\WinForms\ToolTip.cs (57)
144UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ACTIVATE, (value==true)? 1: 0, 0); 225UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPBKCOLOR, ColorTranslator.ToWin32(backColor), 0); 290UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPTEXTCOLOR, ColorTranslator.ToWin32(foreColor), 0); 357IntPtr rootHwnd =UnsafeNativeMethods.GetAncestor(new HandleRef(window, window.Handle), NativeMethods.GA_ROOT); 538UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTITLE, (int)toolTipIcon, title); 542UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_UPDATE, 0, 0); 577UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTITLE, (int)toolTipIcon, toolTipTitle); 581UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_UPDATE, 0, 0); 898int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 900UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 906UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 926UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ACTIVATE, (active == true) ? 1 : 0, 0); 929UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPBKCOLOR, ColorTranslator.ToWin32(BackColor), 0); 932UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPTEXTCOLOR, ColorTranslator.ToWin32(ForeColor), 0); 937UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTITLE, (int)toolTipIcon, title); 971int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ADDTOOL, 0, tool); 1066UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_DELTOOL, 0, GetMinTOOLINFO(ctl)); 1116return (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETDELAYTIME, type, 0); 1210bool isWindowMirrored = ((unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, hWnd), NativeMethods.GWL_STYLE)) & NativeMethods.WS_EX_LAYOUTRTL) == NativeMethods.WS_EX_LAYOUTRTL); 1284IntPtr found = UnsafeNativeMethods.ChildWindowFromPointEx(new HandleRef(null, baseHwnd), pt.X, pt.Y, NativeMethods.CWP_SKIPINVISIBLE); 1401UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETDELAYTIME, type, time); 1478UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTOOLINFO, 1557UnsafeNativeMethods.GetWindowRect(new HandleRef(associatedControl, associatedControl.Handle), ref r); 1660UnsafeNativeMethods.GetWindowRect(new HandleRef(window, Control.GetSafeHandle(window)), ref r); 1687UnsafeNativeMethods.GetWindowRect(new HandleRef(window, Control.GetSafeHandle(window)), ref r); 1712UnsafeNativeMethods.GetWindowRect(new HandleRef(window, Control.GetSafeHandle(window)), ref r); 1737UnsafeNativeMethods.GetWindowRect(new HandleRef(window, Control.GetSafeHandle(window)), ref r); 1783IntPtr bubbleSizeInt = UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_GETBUBBLESIZE, 0, this.GetMinToolInfoForTool(tool.GetOwnerWindow())); 1931UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(pointX, pointY)); 1960UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_TRACKACTIVATE, 0, GetWinTOOLINFO(hWnd)); 1961UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_DELTOOL, 0, GetWinTOOLINFO(hWnd)); 2018int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETTOOLINFO, 0, ti); 2040UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_SETTOOLINFO, 0, ti); 2041UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_TRACKACTIVATE, 1, ti); 2075UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_ADDTOOL, 0, toolInfo); 2076UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_TRACKACTIVATE, 1, toolInfo); 2173SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), 2186UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 2189int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti); 2233int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti); 2247UnsafeNativeMethods.GetWindowRect(new HandleRef(win, Control.GetSafeHandle(win)), ref r); 2285UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 2289int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti); 2319UnsafeNativeMethods.GetWindowRect(new HandleRef(this, Handle), ref r); 2325UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ADJUSTRECT, 1, ref r); 2339UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, maxwidth); 2344SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), 2353SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), 2372SafeNativeMethods.ShowWindow(new HandleRef(this, Handle), NativeMethods.SW_HIDE); 2400int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti); 2494int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti); 2516UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, screen.WorkingArea.Width); 2599IntPtr dc = UnsafeNativeMethods.BeginPaint(new HandleRef(this,Handle),ref ps); 2610int ret = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti)); 2620font = Font.FromHfont(UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.WM_GETFONT, 0, 0)); 2640UnsafeNativeMethods.EndPaint(new HandleRef(this,Handle),ref ps);
winforms\Managed\System\WinForms\TreeNode.cs (22)
284if ((int)UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEMRECT, 1, ref rc) == 0) { 307if ((int)UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEMRECT, 0, ref rc) == 0) { 345UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item); 637bool visible = ((int)UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEMRECT, 1, ref rc) != 0); 712IntPtr next = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), 840IntPtr prev = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), 920UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEM, 0, ref item); 1208UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EDITLABEL, 0, handle); 1382UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EXPAND, NativeMethods.TVE_COLLAPSE, Handle); 1493UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_ENDEDITLABELNOW, cancel?1:0, 0); 1554UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_ENSUREVISIBLE, 0, Handle); 1570UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EXPAND, NativeMethods.TVE_EXPAND, Handle); 1711IntPtr editHandle = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETEDITCONTROL, 0, 0); 1716UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_ENDEDITLABELNOW, 0 /* fCancel==FALSE */, 0); 1719handle = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_INSERTITEM, 0, ref tvis); 1728UnsafeNativeMethods.PostMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EDITLABEL, IntPtr.Zero, handle); 1731SafeNativeMethods.InvalidateRect(new HandleRef(tv, tv.Handle), null, false); 1739UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.WM_SETREDRAW, 1, 0); 1806UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_DELETEITEM, 0, handle); 1832UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item); 1944UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item); 1964UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item);
winforms\Managed\System\WinForms\TreeView.cs (38)
358int currentStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 1750UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_SETREDRAW, (IntPtr)1, IntPtr.Zero); 1764UnsafeNativeMethods.SendMessage(new HandleRef(toolTip, toolTip.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 1765UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TVM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 1787IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi); 1837IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi); 1992int style = unchecked((int)(UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 1994UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 1998int style = unchecked((int)(UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 2000UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 2045SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef, this.Left, this.Top, Int32.MaxValue, this.Height, flags); 2051SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef, this.Left, this.Top, oldSize, this.Height, flags); 2098SafeNativeMethods.ImageList_Destroy_Native(new HandleRef(this, handleOld)); 2109SafeNativeMethods.ImageList_Destroy_Native(new HandleRef(this, handle)); 2167IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 2580if (unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_GETITEMRECT, 1, ref rc)) != 0) 2581SafeNativeMethods.InvalidateRect(new HandleRef(this, Handle), ref rc, true); 2732if (UnsafeNativeMethods.GetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_HORZ,si) != false) { 2793SafeNativeMethods.SelectObject(new HandleRef(nmcd.nmcd, nmcd.nmcd.hdc), new HandleRef(renderinfo, renderinfo.FontHandle)); 2908IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 2920UnsafeNativeMethods.SendMessage(new HandleRef(this, tooltipHandle), NativeMethods.TTM_ADJUSTRECT, 1, ref bounds); 2921SafeNativeMethods.SetWindowPos(new HandleRef(this, tooltipHandle), 2943IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 3022IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 3095UnsafeNativeMethods.SetForegroundWindow(new HandleRef(this, this.Handle)); 3099SafeNativeMethods.TrackPopupMenuEx(new HandleRef(contextMenu, contextMenu.Handle), 3103new HandleRef(this, this.Handle), 3107UnsafeNativeMethods.PostMessage(new HandleRef(this, this.Handle), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero); 3113UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.TVM_SELECTITEM, NativeMethods.TVGN_DROPHILITE, treeNode.Handle); 3194UnsafeNativeMethods.SendMessage(new HandleRef(null, this.Handle), NativeMethods.TVM_GETITEM, 0, ref item1); 3210UnsafeNativeMethods.SendMessage(new HandleRef(nmhdr, nmhdr.hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 3259hNodeMouseDown = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 3287IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi); 3357hNodeMouseDown = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhit);
winforms\Managed\System\WinForms\TrustManagerPromptUI.cs (1)
728UnsafeNativeMethods.SendMessage(new HandleRef(toolTipFromUrl, toolTipFromUrl.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, 600);
winforms\Managed\System\WinForms\UnsafeNativeMethods.cs (5)
1668int regionDataSize = GetRegionData(new HandleRef(null, hRgn), 0, IntPtr.Zero); 1672int ret = GetRegionData(new HandleRef(null, hRgn), regionDataSize, pBytes); 8277CloseHandle(new HandleRef(this, hProcess)); 8283CloseHandle(new HandleRef(this, hThread)); 8980if (GetProcAddress(new HandleRef(null, kernel32), "AddDllDirectory") != IntPtr.Zero) {
winforms\Managed\System\WinForms\UpDownBase.cs (3)
1165UnsafeNativeMethods.MapWindowPoints(new HandleRef(child, child.Handle), new HandleRef(this, Handle), point, 1); 1225UnsafeNativeMethods.SetFocus(new HandleRef(TextBox, TextBox.Handle));
winforms\Managed\System\WinForms\UserControl.cs (2)
296if (hwnd == hwndFocus || SafeNativeMethods.IsChild(new HandleRef(this, hwnd), new HandleRef(null, hwndFocus)))
winforms\Managed\System\WinForms\VisualStyles\VisualStyleInformation.cs (2)
239return (SafeNativeMethods.GetThemeSysBool(new HandleRef(null, visualStyleRenderer.Handle), VisualStyleSystemProperty.SupportsFlatMenus)); 262SafeNativeMethods.GetThemeSysInt(new HandleRef(null, visualStyleRenderer.Handle), VisualStyleSystemProperty.MinimumColorDepth, ref mcDepth);
winforms\Managed\System\WinForms\VisualStyles\VisualStyleRenderer.cs (37)
129returnVal = SafeNativeMethods.IsThemePartDefined(new HandleRef(null, hTheme), part, 0); 137returnVal = SafeNativeMethods.IsThemePartDefined(new HandleRef(null, tHandle.NativeHandle), part, 0); 290using (ThemeHandle hTheme = ThemeHandle.Create(_class, true, new HandleRef(null, hWnd))) { 291lastHResult = SafeNativeMethods.DrawThemeBackground(new HandleRef(this, hTheme.NativeHandle), hdc, part, state, new NativeMethods.COMRECT(bounds), null); 295lastHResult = SafeNativeMethods.DrawThemeBackground(new HandleRef(this, Handle), hdc, part, state, new NativeMethods.COMRECT(bounds), null); 324using (ThemeHandle hTheme = ThemeHandle.Create(_class, true, new HandleRef(null, hWnd))) { 325lastHResult = SafeNativeMethods.DrawThemeBackground(new HandleRef(this, hTheme.NativeHandle), hdc, part, state, new NativeMethods.COMRECT(bounds), new NativeMethods.COMRECT(clipRectangle)); 329lastHResult = SafeNativeMethods.DrawThemeBackground(new HandleRef(this, Handle), hdc, part, state, new NativeMethods.COMRECT(bounds), new NativeMethods.COMRECT(clipRectangle)); 361lastHResult = SafeNativeMethods.DrawThemeEdge( new HandleRef( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), (int) style, (int) edges | (int) effects | EdgeAdjust, rect ); 452lastHResult = SafeNativeMethods.DrawThemeParentBackground( new HandleRef( this, childControl.Handle ), hdc, new NativeMethods.COMRECT( bounds ) ); 497lastHResult = SafeNativeMethods.DrawThemeText( new HandleRef( this, Handle ), hdc, part, state, textToDraw, textToDraw.Length, (int) flags, disableFlag, new NativeMethods.COMRECT( bounds ) ); 520lastHResult = SafeNativeMethods.GetThemeBackgroundContentRect( new HandleRef( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), rect ); 544lastHResult = SafeNativeMethods.GetThemeBackgroundExtent( new HandleRef( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( contentBounds ), rect ); 572lastHResult = SafeNativeMethods.GetThemeBackgroundRegion( new HandleRef( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), ref hRegion ); 585 SafeNativeMethods.ExternalDeleteObject(new HandleRef(null, hRegion)); 602lastHResult = SafeNativeMethods.GetThemeBool(new HandleRef(this, Handle), part, state, (int)prop, ref val); 620lastHResult = SafeNativeMethods.GetThemeColor(new HandleRef(this, Handle), part, state, (int)prop, ref color); 638lastHResult = SafeNativeMethods.GetThemeEnumValue(new HandleRef(this, Handle), part, state, (int)prop, ref val); 656lastHResult = SafeNativeMethods.GetThemeFilename(new HandleRef(this, Handle), part, state, (int)prop, filename, filename.Capacity); 684lastHResult = SafeNativeMethods.GetThemeFont( new HandleRef( this, Handle ), hdc, part, state, (int) prop, logfont ); 727lastHResult = SafeNativeMethods.GetThemeInt(new HandleRef(this, Handle), part, state, (int)prop, ref val); 756using (ThemeHandle hTheme = ThemeHandle.Create(_class, true, new HandleRef(null, hWnd))) { 757lastHResult = SafeNativeMethods.GetThemePartSize(new HandleRef(this, hTheme.NativeHandle), hdc, part, state, null, type, size); 761lastHResult = SafeNativeMethods.GetThemePartSize( new HandleRef(this, Handle), hdc, part, state, null, type, size); 789lastHResult = SafeNativeMethods.GetThemePartSize( new HandleRef( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), type, size ); 809lastHResult = SafeNativeMethods.GetThemePosition(new HandleRef(this, Handle), part, state, (int)prop, point); 834lastHResult = SafeNativeMethods.GetThemeMargins( new HandleRef( this, Handle ), hdc, part, state, (int) prop, ref margins ); 855lastHResult = SafeNativeMethods.GetThemeString(new HandleRef(this, Handle), part, state, (int)prop, aString, aString.Capacity); 878lastHResult = SafeNativeMethods.GetThemeTextExtent( new HandleRef( this, Handle ), hdc, part, state, textToDraw, textToDraw.Length, (int) flags, null, rect ); 903lastHResult = SafeNativeMethods.GetThemeTextExtent( new HandleRef( this, Handle ), hdc, part, state, textToDraw, textToDraw.Length, (int) flags, new NativeMethods.COMRECT( bounds ), rect ); 924lastHResult = SafeNativeMethods.GetThemeTextMetrics( new HandleRef( this, Handle ), hdc, part, state, ref tm ); 948lastHResult = SafeNativeMethods.HitTestThemeBackground( new HandleRef( this, Handle ), hdc, part, state, (int) options, new NativeMethods.COMRECT( backgroundRectangle ), NativeMethods.NullHandleRef, point, ref htCode ); 991lastHResult = SafeNativeMethods.HitTestThemeBackground( new HandleRef( this, Handle ), hdc, part, state, (int) options, new NativeMethods.COMRECT( backgroundRectangle ), new HandleRef( this, hRgn ), point, ref htCode ); 1004return (SafeNativeMethods.IsThemeBackgroundPartiallyTransparent(new HandleRef(this, Handle), part, state)); 1129return Create(className, throwExceptionOnFail, new HandleRef(null, IntPtr.Zero)); 1171SafeNativeMethods.CloseThemeData(new HandleRef(null, _hTheme));
winforms\Managed\System\WinForms\WebBrowser.cs (2)
1203&& SafeNativeMethods.IsChild(new HandleRef(this, this.Handle), new HandleRef(null, hwndFocus));
winforms\Managed\System\WinForms\WebBrowserBase.cs (5)
401if (SafeNativeMethods.IsAccelerator(new HandleRef(ctlInfo, ctlInfo.hAccel), ctlInfo.cAccel, ref msg, null)) { 493Application.ParkHandle(new HandleRef(this.AXInPlaceObject, hwndInPlaceObject)); 837UnsafeNativeMethods.SetParent(new HandleRef(null, hwnd), new HandleRef(this, this.Handle)); 1227cc = Control.FromHandle(UnsafeNativeMethods.GetParent(new HandleRef(this, Handle))) as ContainerControl;
winforms\Managed\System\WinForms\WebBrowserHelper.cs (4)
119logPixelsX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSX); 120UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 137logPixelsY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSY); 138UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC));
winforms\Managed\System\WinForms\WebBrowserSiteBase.cs (1)
262return UnsafeNativeMethods.GetParent(new HandleRef(Host, Host.Handle));
winforms\Managed\System\WinForms\WinFormsUtils.cs (8)
288IntPtr rootHwnd = UnsafeNativeMethods.GetAncestor(new HandleRef(hwnd, hwnd.Handle), NativeMethods.GA_ROOT); 289return new HandleRef(hwnd.Wrapper, rootHwnd); 294return GetRootHWnd(new HandleRef(control, control.Handle)); 331UnsafeNativeMethods.MapWindowPoints(new HandleRef(fromControl, fromControl.Handle), new HandleRef(toControl, toControl.Handle), pt, 1); 630HandleRef hClippingRegion = new HandleRef(null, SafeNativeMethods.CreateRectRgn(viewportOrg.x + bounds.Left, viewportOrg.y + bounds.Top, viewportOrg.x + bounds.Right, viewportOrg.y + bounds.Bottom)); 636hOriginalClippingRegion = new HandleRef(this, SafeNativeMethods.CreateRectRgn(0, 0, 0, 0)); 672hOriginalClippingRegion = new HandleRef(null, IntPtr.Zero);
System.Workflow.ComponentModel (8)
AuthoringOM\Design\DesignerHelpers.cs (5)
917this.hdc = new HandleRef(this, this.graphics.GetHdc()); 933this.oldPen = new HandleRef(this, handle); 939this.oldPenEx = new HandleRef(this, handle); 945this.oldBrush = new HandleRef(this, handle); 1118this.hpen = new HandleRef(this, penPtr);
Shared\NativeMethods.cs (3)
355if (GetProcAddress(new HandleRef(null, kernel32), "AddDllDirectory") != IntPtr.Zero) 381IntPtr pfnProc = NativeMethods.GetProcAddress(new HandleRef(isAvailable, hmod), procName); 388NativeMethods.FreeLibrary(new HandleRef(isAvailable, hmod));
WindowsBase (43)
Base\System\Windows\SplashScreen.cs (9)
205HandleRef nullHandle = new HandleRef(null, IntPtr.Zero); 218nullHandle, nullHandle, new HandleRef(null, _hInstance), IntPtr.Zero); 222IntPtr memDC = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hScreenDC)); 223IntPtr hOldBitmap = UnsafeNativeMethods.SelectObject(new HandleRef(null, memDC), hBitmap.MakeHandleRef(null).Handle); 237UnsafeNativeMethods.SelectObject(new HandleRef(null, memDC), hOldBitmap); 238UnsafeNativeMethods.ReleaseDC(new HandleRef(), new HandleRef(null, memDC)); 239UnsafeNativeMethods.ReleaseDC(new HandleRef(), new HandleRef(null, hScreenDC)); 304IntPtr prevHwnd = UnsafeNativeMethods.SetActiveWindow(new HandleRef(null, _hwnd)); 360HandleRef hwnd = new HandleRef(null, _hwnd);
Base\System\Windows\Threading\Dispatcher.cs (9)
2379new HandleRef(this, hwnd), 2513SafeNativeMethods.KillTimer(new HandleRef(this, hwnd), TIMERID_BACKGROUND); 2644SafeNativeMethods.KillTimer(new HandleRef(this, _window.Value.Handle), TIMERID_BACKGROUND); 2649UnsafeNativeMethods.PeekMessage(ref msg, new HandleRef(this, _window.Value.Handle), _msgProcessQueue, _msgProcessQueue, NativeMethods.PM_REMOVE); 2695SafeNativeMethods.KillTimer(new HandleRef(this, _window.Value.Handle), TIMERID_BACKGROUND); 2702bool succeeded = UnsafeNativeMethods.TryPostMessage(new HandleRef(this, _window.Value.Handle), _msgProcessQueue, IntPtr.Zero, IntPtr.Zero); 2731succeeded = SafeNativeMethods.TrySetTimer(new HandleRef(this, _window.Value.Handle), TIMERID_BACKGROUND, DELTA_BACKGROUND); 2982new HandleRef(this, _window.Value.Handle), 3003new HandleRef(this, _window.Value.Handle),
Shared\MS\Win32\HwndSubclass.cs (5)
63IntPtr address = UnsafeNativeMethods.GetProcAddress(new HandleRef(null,hModuleUser32), "DefWindowProcW"); 469IntPtr oldWndProc = UnsafeNativeMethods.GetWindowLongPtr(new HandleRef(this,hwnd), NativeMethods.GWL_WNDPROC); 539_hwndHandleRef = new HandleRef(null,_hwndAttached); 592NativeMethods.WndProc currentWndProc = UnsafeNativeMethods.GetWindowLongWndProc(new HandleRef(this,_hwndAttached)); 626_hwndHandleRef = new HandleRef(null,IntPtr.Zero);
Shared\MS\Win32\HwndWrapper.cs (4)
159new HandleRef(null,parent), 160new HandleRef(null,IntPtr.Zero), 161new HandleRef(null,IntPtr.Zero), 419UnsafeNativeMethods.DestroyWindow(new HandleRef(null, handle.Value));
Shared\MS\Win32\ManagedWndProcTracker.cs (5)
108int windowStyle = UnsafeNativeMethods.GetWindowLong(new HandleRef(null,hwnd), NativeMethods.GWL_STYLE); 174result = UnsafeNativeMethods.SetWindowLong(new HandleRef(null,hwnd), NativeMethods.GWL_WNDPROC, defWindowProc); 191UnsafeNativeMethods.PostMessage(new HandleRef(null,hwnd), WindowMessage.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 202if (SafeNativeMethods.IsWindowUnicode(new HandleRef(null,hwnd))) 236return UnsafeNativeMethods.GetProcAddress(new HandleRef(null, hModule), export);
Shared\MS\Win32\NativeMethodsCLR.cs (5)
105public static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 901public static HandleRef HWND_TOP = new HandleRef(null, (IntPtr)0); 902public static HandleRef HWND_BOTTOM = new HandleRef(null, (IntPtr)1); 903public static HandleRef HWND_TOPMOST = new HandleRef(null, new IntPtr(-1)); 904public static HandleRef HWND_NOTOPMOST = new HandleRef(null, new IntPtr(-2));
Shared\MS\Win32\NativeMethodsOther.cs (3)
317return new HandleRef(obj, handle); 1343return new HandleRef(wrapper,h); 1423return new HandleRef(wrapper, h);
Shared\MS\Win32\UnsafeNativeMethodsOther.cs (3)
582return CloseHandleNoThrow(new HandleRef(null, handle)); 622return UnsafeNativeMethods.UnmapViewOfFileNoThrow(new HandleRef(null, handle)); 1608return new HandleRef(lpfn, result);