MS\Internal\AppModel\CookieHandler.cs (2)
106if (UnsafeNativeMethods.InternetGetCookieEx(uriString, null, null, ref size, 0, IntPtr.Zero))
113if (UnsafeNativeMethods.InternetGetCookieEx(uriString, null, sb, ref size, 0, IntPtr.Zero))
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\MimeTypeMapper.cs (1)
86IntPtr.Zero,
System\Windows\InterOp\HwndTarget.cs (31)
98private static readonly IntPtr Unhandled = IntPtr.Zero;
473Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero);
484IntPtr hwndParent = IntPtr.Zero;
500if (hwndParent != IntPtr.Zero)
504} while (hwndParent != IntPtr.Zero);
507Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero);
956UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true);
1003UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true);
1103UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true);
1120bool enableRenderTarget = (wparam != IntPtr.Zero);
1244UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true);
1281UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true);
1315UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true);
1337UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true);
1373&& !UnsafeNativeMethods.GetLayeredWindowAttributes(_hWnd.MakeHandleRef(this), IntPtr.Zero, IntPtr.Zero, IntPtr.Zero)
1439return IntPtr.Zero;
1445return IntPtr.Zero;
1753new HandleRef(null, IntPtr.Zero), // HWND_TOP
1775new HandleRef(null, IntPtr.Zero), // HWND_TOP
1780UnsafeNativeMethods.InvalidateRect(new HandleRef(this, _hWnd), IntPtr.Zero, true);
1895if(hwndParent != IntPtr.Zero)
2200UnsafeNativeMethods.UpdateLayeredWindow(_hWnd.h, IntPtr.Zero, null, null, IntPtr.Zero, null, 0, ref blend, NativeMethods.ULW_ALPHA);
2279UnsafeNativeMethods.PostMessage(new HandleRef(this, _hWnd), s_updateWindowSettings, IntPtr.Zero, IntPtr.Zero);
2547IntPtr.Zero,
2560if (_hPowerNotify != IntPtr.Zero)
2563_hPowerNotify = IntPtr.Zero;
2608IntPtr retInt = IntPtr.Zero;
MS\Internal\PtsHost\FigureParagraph.cs (11)
172CreateSubpageFiniteHelper(PtsContext, IntPtr.Zero, PTS.False, _mainTextSegment.Handle, IntPtr.Zero, PTS.False, PTS.True,
178if(brParaOut != IntPtr.Zero)
195if (pfsFigureContent != IntPtr.Zero)
199if (pmcsclientOut != IntPtr.Zero)
204pmcsclientOut = IntPtr.Zero;
215CreateSubpageFiniteHelper(PtsContext, IntPtr.Zero, PTS.False, _mainTextSegment.Handle, IntPtr.Zero, PTS.False, PTS.True,
221if(brParaOut != IntPtr.Zero)
239if (pmcsclientOut != IntPtr.Zero)
244pmcsclientOut = IntPtr.Zero;
System\Windows\Controls\Primitives\Popup.cs (23)
1228bool reestablishCapture = e.OriginalSource != root && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero;
1760if (wParam == IntPtr.Zero)
1793return IntPtr.Zero;
2674if (monitor != IntPtr.Zero)
2755if (hCursor != IntPtr.Zero)
3083UnsafeNativeMethods.SetWindowPos(new HandleRef(null, Handle), new HandleRef(null, IntPtr.Zero),
3092if (parent != IntPtr.Zero)
3105if (hwnd != IntPtr.Zero)
3173lastWebOCHwnd == IntPtr.Zero ? NativeMethods.HWND_TOP : new HandleRef(null, lastWebOCHwnd),
3211while (lastHwnd != IntPtr.Zero)
3311IntPtr parent = IntPtr.Zero;
3343if ( parent != IntPtr.Zero )
3351if ((parent != IntPtr.Zero) && ConnectedToForegroundWindow(parent))
3381while (window != IntPtr.Zero)
3400return (hwnd!=null ? hwnd.Handle : IntPtr.Zero);
3408if (child != IntPtr.Zero)
3414return IntPtr.Zero;
3433if (Handle != IntPtr.Zero && (UnsafeNativeMethods.IsWinEventHookInstalled(NativeMethods.EVENT_OBJECT_FOCUS) || UnsafeNativeMethods.IsWinEventHookInstalled(NativeMethods.EVENT_OBJECT_STATECHANGE)))
3438if (popupRootAutomationPeer.Hwnd == IntPtr.Zero)
3441IntPtr lResult = AutomationInteropProvider.ReturnRawElementProvider(Handle, IntPtr.Zero, new IntPtr(NativeMethods.OBJID_CLIENT), RootProviderForHwnd);
3442if (lResult != IntPtr.Zero)
3447hr = UnsafeNativeMethods.ObjectFromLresult(lResult, ref iid, IntPtr.Zero, ref acc);
3525return DpiUtil.GetProcessDpiAwareness(IntPtr.Zero) == NativeMethods.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE;
System\Windows\Documents\ImmComposition.cs (22)
185IntPtr hwnd = IntPtr.Zero;
190if (himc != IntPtr.Zero)
323IntPtr lret = IntPtr.Zero;
402if (himc == IntPtr.Zero)
413size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_RESULTSTR, IntPtr.Zero, 0);
427size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPSTR, IntPtr.Zero, 0);
439cursorPos = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_CURSORPOS, IntPtr.Zero, 0);
447deltaStart = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_DELTASTART, IntPtr.Zero, 0);
455size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPATTR, IntPtr.Zero, 0);
569if (himc != IntPtr.Zero)
751if (himc != IntPtr.Zero)
1276IntPtr lret = IntPtr.Zero;
1311return IntPtr.Zero;
1333if (lParam != IntPtr.Zero)
1493return IntPtr.Zero;
1498return IntPtr.Zero;
1507return IntPtr.Zero;
1726IntPtr hwnd = IntPtr.Zero;
1732IntPtr lret = IntPtr.Zero;
1733if (himc != IntPtr.Zero)
1735IntPtr hwndDefIme = IntPtr.Zero;
1741return (lret != IntPtr.Zero) ? true : false;
System\Windows\Interop\HwndHost.cs (33)
68if (_hwnd.Handle != IntPtr.Zero)
72_hwnd = new HandleRef(null, IntPtr.Zero);
301if (Handle != IntPtr.Zero && (hwndFocus.Handle == _hwnd.Handle || UnsafeNativeMethods.IsChild(_hwnd, hwndFocus)))
338if (( Handle != IntPtr.Zero) && IsVisible)
554_hwnd = new HandleRef(null, IntPtr.Zero);
612return IntPtr.Zero ;
627IntPtr result = IntPtr.Zero;
656new HandleRef(null, IntPtr.Zero),
694if(Handle != IntPtr.Zero)
726if(Handle != IntPtr.Zero)
733HandleRef hdcScreen = new HandleRef(this, UnsafeNativeMethods.GetDC(new HandleRef(this, IntPtr.Zero)));
734if(hdcScreen.Handle != IntPtr.Zero)
736HandleRef hdcBitmap = new HandleRef(this, IntPtr.Zero);
737HandleRef hBitmap = new HandleRef(this, IntPtr.Zero);
742if(hdcBitmap.Handle != IntPtr.Zero)
746if(hBitmap.Handle != IntPtr.Zero)
778UnsafeNativeMethods.CriticalRedrawWindow(_hwnd, IntPtr.Zero, IntPtr.Zero, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_ALLCHILDREN);
783System.Windows.Media.Imaging.BitmapSource bitmapSource = Imaging.CriticalCreateBitmapSourceFromHBitmap(hBitmap.Handle, IntPtr.Zero, Int32Rect.Empty, null, WICBitmapAlphaChannelOption.WICBitmapIgnoreAlpha);
798UnsafeNativeMethods.ReleaseDC(new HandleRef(this, IntPtr.Zero), hdcScreen);
799hdcScreen = new HandleRef(null, IntPtr.Zero);
801if(hBitmap.Handle != IntPtr.Zero)
804hBitmap = new HandleRef(this, IntPtr.Zero);
807if(hdcBitmap.Handle != IntPtr.Zero)
810hdcBitmap = new HandleRef(this, IntPtr.Zero);
924IntPtr hwndParent = IntPtr.Zero;
950if(hwndParent != IntPtr.Zero)
952if(_hwnd.Handle == IntPtr.Zero)
968else if (Handle != IntPtr.Zero)
1011if(_hwnd.Handle == IntPtr.Zero || !UnsafeNativeMethods.IsWindow(_hwnd))
1077if( Handle == IntPtr.Zero)
1093_hwnd = new HandleRef(null, IntPtr.Zero);
1106IntPtr result = IntPtr.Zero ;
System\Windows\MessageBox.cs (8)
107return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, defaultResult, options);
122return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, defaultResult, 0);
136return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, 0, 0);
149return ShowCore(IntPtr.Zero, messageBoxText, caption, button, MessageBoxImage.None, 0, 0);
159return ShowCore(IntPtr.Zero, messageBoxText, caption, MessageBoxButton.OK, MessageBoxImage.None, 0, 0);
169return ShowCore(IntPtr.Zero, messageBoxText, String.Empty, MessageBoxButton.OK, MessageBoxImage.None, 0, 0);
395if (owner != IntPtr.Zero)
402if (owner == IntPtr.Zero)
System\Windows\Shell\WindowChromeWorker.cs (23)
146if (IntPtr.Zero != _hwnd)
216if (_chromeInfo != null && _hwnd != IntPtr.Zero)
232if (_hwnd == IntPtr.Zero || _hwndSource.IsDisposed)
256NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
357return IntPtr.Zero;
442IntPtr retVal = IntPtr.Zero;
518if (IntPtr.Zero != lRet)
543return IntPtr.Zero;
563return IntPtr.Zero;
592return IntPtr.Zero;
600return IntPtr.Zero;
670if (IntPtr.Zero != hmenu)
713if (IntPtr.Zero == _hwnd || _hwndSource.IsDisposed)
735NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
741NativeMethods.SetWindowRgn(_hwnd, IntPtr.Zero, NativeMethods.IsWindowVisible(_hwnd));
777IntPtr hrgn = IntPtr.Zero;
782hrgn = IntPtr.Zero;
809IntPtr hrgn = IntPtr.Zero;
859hrgn = IntPtr.Zero;
895IntPtr hrgn = IntPtr.Zero;
943if (IntPtr.Zero == _hwnd)
1143if (!Utility.IsOSVistaOrNewer || _hwnd == IntPtr.Zero)
1161NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
System\Windows\Standard\NativeMethods.cs (28)
1408if (!_hwnd.HasValue || _hwnd.Value == IntPtr.Zero)
1423dc = NativeMethods.CreateDC(deviceName, null, IntPtr.Zero, IntPtr.Zero);
1445IntPtr hPtr = IntPtr.Zero;
1493return GetDC(IntPtr.Zero);
1504_hwnd = IntPtr.Zero,
1560handle = IntPtr.Zero;
1596handle = IntPtr.Zero;
2347IntPtr argv = IntPtr.Zero;
2353if (argv == IntPtr.Zero)
2371Assert.AreEqual(IntPtr.Zero, p);
2387hBitmap = _CreateDIBSectionIntPtr(IntPtr.Zero, ref bitmapInfo, DIB_RGB_COLORS, out ppvBits, hSection, dwOffset);
2408if (IntPtr.Zero == ret)
2421if (IntPtr.Zero == ret)
2434if (IntPtr.Zero == ret)
2474if (IntPtr.Zero == ret)
2710if (retPtr == IntPtr.Zero)
2737if (retPtr == IntPtr.Zero)
2753IntPtr ret = IntPtr.Zero;
2762if (IntPtr.Zero == ret)
2899if (ret == IntPtr.Zero)
3041if (ret == IntPtr.Zero)
3054if (ret == IntPtr.Zero)
3141if (!_UpdateLayeredWindowIntPtr(hwnd, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, crKey, ref pblend, dwFlags))
System\Windows\SystemCommands.cs (5)
31if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd))
36NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero);
80if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd))
87uint cmd = NativeMethods.TrackPopupMenuEx(hmenu, TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD, (int)physicalScreenLocation.X, (int)physicalScreenLocation.Y, hwnd, IntPtr.Zero);
90NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr(cmd), IntPtr.Zero);
System\Windows\Window.cs (46)
251UnsafeNativeMethods.SendMessage( Handle, WindowMessage.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_MOUSEMOVE, IntPtr.Zero);
252UnsafeNativeMethods.SendMessage( Handle, WindowMessage.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero);
292_dialogOwnerHandle = IntPtr.Zero;
302if (_dialogOwnerHandle == IntPtr.Zero)
309if ((_dialogOwnerHandle != IntPtr.Zero) &&
312_dialogOwnerHandle = IntPtr.Zero;
317if (_dialogOwnerHandle != IntPtr.Zero)
322while (_dialogOwnerHandle != IntPtr.Zero)
358if (hWndCapture != IntPtr.Zero)
426if ( (_dialogPreviousActiveHandle != IntPtr.Zero) &&
1292SetOwnerHandle(_ownerWindow != null ? _ownerWindow.Handle: IntPtr.Zero);
2610if (handle != IntPtr.Zero)
2839new HandleRef(null, IntPtr.Zero),
2922new HandleRef(null, IntPtr.Zero),
3023new HandleRef(null, IntPtr.Zero),
3197return IntPtr.Zero;
3785IntPtr hMonitor = IntPtr.Zero;
3786if ((_ownerHandle == IntPtr.Zero) ||
3798if (hMonitor != IntPtr.Zero)
3822if (Owner.Handle == IntPtr.Zero)
3840if ((_ownerHandle != IntPtr.Zero) && UnsafeNativeMethods.IsWindow(new HandleRef(null, _ownerHandle)))
3879Debug.Assert(hMonitor != IntPtr.Zero);
3888if (hMonitor == IntPtr.Zero)
4168if (_ownerHandle == ownerHandle && _ownerHandle == IntPtr.Zero)
4176_ownerHandle = (IntPtr.Zero == ownerHandle && !ShowInTaskbar)
4249IntPtr retInt = IntPtr.Zero ;
4479(_dialogPreviousActiveHandle != IntPtr.Zero) &&
5996if (hMonitor != IntPtr.Zero)
6239new HandleRef(null, IntPtr.Zero),
6359IntPtr.Zero,
6382if (_ownerHandle == IntPtr.Zero)
6404SetOwnerHandle(IntPtr.Zero);
6412UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), WM_APPLYTASKBARITEMINFO, IntPtr.Zero, IntPtr.Zero);
6747nativeTB.hIcon = IntPtr.Zero;
6864if (manager.Dirty && Handle != IntPtr.Zero)
6931SetOwnerHandle(IntPtr.Zero);
7236private IntPtr _ownerHandle = IntPtr.Zero; // no need to dispose this
7290private IntPtr _dialogOwnerHandle = IntPtr.Zero;
7392return IntPtr.Zero;
7411if ( monitor != IntPtr.Zero )
7818return DpiUtil.GetProcessDpiAwareness(IntPtr.Zero) == NativeMethods.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE;
7833var nullHandle = new HandleRef(null, IntPtr.Zero);
7837IntPtr.Zero,
7839IntPtr.Zero);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (4)
32GetMessage(errorCode, IntPtr.Zero);
37if (moduleHandle != IntPtr.Zero)
46int length = FormatMessage(flags, moduleHandle, unchecked((uint)errorCode), 0, bufferPtr, stackBuffer.Length, IntPtr.Zero);
61int length = FormatMessage(flags | FORMAT_MESSAGE_ALLOCATE_BUFFER, moduleHandle, unchecked((uint)errorCode), 0, &nativeMsgPtr, 0, IntPtr.Zero);
src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\IsolatedComponentLoadContext.cs (1)
51return IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (9)
250private IntPtr m_writeEventStringEventHandle = IntPtr.Zero;
814Debug.Assert(eventHandle != IntPtr.Zero);
1937decoded = dataPointer == IntPtr.Zero ? null : new string((char*)dataPointer, 0, (data->Size >> 1) - 1);
2158args[i] = dataPointer == IntPtr.Zero ? null : new string((char*)dataPointer, 0, (data->Size >> 1) - 1);
2265m_etwProvider?.WriteEvent(ref descr, IntPtr.Zero, null, null, 1, (IntPtr)((void*)&data));
2269if (m_writeEventStringEventHandle == IntPtr.Zero)
2278if (m_writeEventStringEventHandle == IntPtr.Zero)
2948if (!m_etwProvider.WriteEvent(ref manifestDescr, IntPtr.Zero, null, null, 2, (IntPtr)dataDescrs))
3527metadata.EventHandle = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventHandleTable.cs (1)
26IntPtr ret = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendarData.Nls.cs (4)
29return Interop.Kernel32.GetCalendarInfoEx(localeName, (uint)calendar, IntPtr.Zero, calType | CAL_RETURN_NUMBER, IntPtr.Zero, 0, out data) != 0;
39int ret = Interop.Kernel32.GetCalendarInfoEx(localeName, (uint)calendar, IntPtr.Zero, calType, (IntPtr)buffer, BUFFER_LENGTH, IntPtr.Zero);
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Nls.cs (12)
22return IntPtr.Zero;
26int ret = Interop.Kernel32.LCMapStringEx(cultureName, Interop.Kernel32.LCMAP_SORTHANDLE, null, 0, &handle, IntPtr.Size, null, null, IntPtr.Zero);
41return IntPtr.Zero;
140int sortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName,
162if (Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName,
214string? localeName = _sortHandle != IntPtr.Zero ? null : _sortName;
267string? localeName = _sortHandle != IntPtr.Zero ? null : _sortName;
395int sortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName,
409if (Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName,
494actualSortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName,
546sortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName,
574return Interop.Kernel32.IsNLSDefinedString(Interop.Kernel32.COMPARE_STRING, 0, IntPtr.Zero, pText, text.Length);
src\System\Runtime\CompilerServices\GenericsHelpers.cs (6)
27return GenericHandleWorker(methodHnd, IntPtr.Zero, signature, 0xFFFFFFFF, IntPtr.Zero);
33return GenericHandleWorker(methodHnd, IntPtr.Zero, pArgs->signature, pArgs->dictionaryIndexAndSlot, pArgs->module);
39return GenericHandleWorker(IntPtr.Zero, classHnd, signature, 0xFFFFFFFF, IntPtr.Zero);
45return GenericHandleWorker(IntPtr.Zero, classHnd, pArgs->signature, pArgs->dictionaryIndexAndSlot, pArgs->module);