MS\Internal\AppModel\CookieHandler.cs (2)
114if (UnsafeNativeMethods.InternetGetCookieEx(uriString, null, null, ref size, 0, IntPtr.Zero))
121if (UnsafeNativeMethods.InternetGetCookieEx(uriString, null, sb, ref size, 0, IntPtr.Zero))
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\MimeTypeMapper.cs (1)
92IntPtr.Zero,
System\Windows\dataobject.cs (36)
619pformatetcOut.ptd = IntPtr.Zero;
674hr = Win32CreateStreamOnHGlobal(IntPtr.Zero, true /*deleteOnRelease*/, ref istream);
698medium.unionmember = IntPtr.Zero;
984if (win32Pointer == IntPtr.Zero)
1013if (win32Pointer != IntPtr.Zero)
1026if (win32Pointer == IntPtr.Zero)
1041if (win32Pointer == IntPtr.Zero)
1070if (win32Pointer == IntPtr.Zero)
1084if (handleOldObject == IntPtr.Zero)
1161int win32Return = UnsafeNativeMethods.WideCharToMultiByte(0 /*CP_ACP*/, 0 /*flags*/, wideString, wideChars, bytes, byteCount, IntPtr.Zero, IntPtr.Zero);
1318if (hBitmap == IntPtr.Zero)
1320return IntPtr.Zero;
1326hDC = Win32GetDC(new HandleRef(this, IntPtr.Zero));
1360Win32ReleaseDC(new HandleRef(this, IntPtr.Zero), new HandleRef(this, hDC));
1379hEnhancedMetafile = IntPtr.Zero;
1403if (hEnhancedMetafile == IntPtr.Zero)
1591istream.Write(buffer, NativeMethods.IntPtrToInt32(size), IntPtr.Zero);
1626if (hBitmap != IntPtr.Zero)
1659if (hMetafile != IntPtr.Zero)
1707if (handle == IntPtr.Zero)
1760IntPtr.Zero,
1805if (handle == IntPtr.Zero)
1816currentPtr = IntPtr.Zero;
1893if (handle == IntPtr.Zero)
2004if (handle == IntPtr.Zero)
2126handle = IntPtr.Zero;
2138if (handle == IntPtr.Zero)
2181IntPtr.Zero,
2281temp.ptd = IntPtr.Zero;
2519if (formatetc[formatetcIndex].ptd != IntPtr.Zero)
2700if (medium.unionmember != IntPtr.Zero && medium.tymed == TYMED.TYMED_ISTREAM)
2756if (hglobal != IntPtr.Zero)
2872if (medium.unionmember != IntPtr.Zero && medium.tymed == TYMED.TYMED_HGLOBAL)
2928if (medium.unionmember != IntPtr.Zero)
3258IntPtr.Zero,
System\Windows\InterOp\HwndTarget.cs (31)
114private static readonly IntPtr Unhandled = IntPtr.Zero;
480Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero);
491IntPtr hwndParent = IntPtr.Zero;
507if (hwndParent != IntPtr.Zero)
511} while (hwndParent != IntPtr.Zero);
514Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero);
963UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true);
1010UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true);
1110UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true);
1127bool enableRenderTarget = (wparam != IntPtr.Zero);
1251UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true);
1288UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true);
1322UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true);
1344UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true);
1380&& !UnsafeNativeMethods.GetLayeredWindowAttributes(_hWnd.MakeHandleRef(this), IntPtr.Zero, IntPtr.Zero, IntPtr.Zero)
1450return IntPtr.Zero;
1456return IntPtr.Zero;
1766new HandleRef(null, IntPtr.Zero), // HWND_TOP
1788new HandleRef(null, IntPtr.Zero), // HWND_TOP
1793UnsafeNativeMethods.InvalidateRect(new HandleRef(this, _hWnd), IntPtr.Zero, true);
1908if(hwndParent != IntPtr.Zero)
2211UnsafeNativeMethods.UpdateLayeredWindow(_hWnd.h, IntPtr.Zero, null, null, IntPtr.Zero, null, 0, ref blend, NativeMethods.ULW_ALPHA);
2290UnsafeNativeMethods.PostMessage(new HandleRef(this, _hWnd), s_updateWindowSettings, IntPtr.Zero, IntPtr.Zero);
2572IntPtr.Zero,
2589if (_hPowerNotify != IntPtr.Zero)
2592_hPowerNotify = IntPtr.Zero;
2645IntPtr retInt = IntPtr.Zero;
MS\Internal\PtsHost\FigureParagraph.cs (11)
184CreateSubpageFiniteHelper(PtsContext, IntPtr.Zero, PTS.False, _mainTextSegment.Handle, IntPtr.Zero, PTS.False, PTS.True,
190if(brParaOut != IntPtr.Zero)
207if (pfsFigureContent != IntPtr.Zero)
211if (pmcsclientOut != IntPtr.Zero)
216pmcsclientOut = IntPtr.Zero;
227CreateSubpageFiniteHelper(PtsContext, IntPtr.Zero, PTS.False, _mainTextSegment.Handle, IntPtr.Zero, PTS.False, PTS.True,
233if(brParaOut != IntPtr.Zero)
251if (pmcsclientOut != IntPtr.Zero)
256pmcsclientOut = IntPtr.Zero;
System\Windows\Controls\Primitives\Popup.cs (23)
1225bool reestablishCapture = e.OriginalSource != root && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero;
1755if (wParam == IntPtr.Zero)
1788return IntPtr.Zero;
2669if (monitor != IntPtr.Zero)
2752if (hCursor != IntPtr.Zero)
3091UnsafeNativeMethods.SetWindowPos(new HandleRef(null, Handle), new HandleRef(null, IntPtr.Zero),
3100if (parent != IntPtr.Zero)
3113if (hwnd != IntPtr.Zero)
3181lastWebOCHwnd == IntPtr.Zero ? NativeMethods.HWND_TOP : new HandleRef(null, lastWebOCHwnd),
3219while (lastHwnd != IntPtr.Zero)
3323IntPtr parent = IntPtr.Zero;
3353if ( parent != IntPtr.Zero )
3361if ((parent != IntPtr.Zero) && ConnectedToForegroundWindow(parent))
3393while (window != IntPtr.Zero)
3412return (hwnd!=null ? hwnd.CriticalHandle : IntPtr.Zero);
3420if (child != IntPtr.Zero)
3426return IntPtr.Zero;
3457if (Handle != IntPtr.Zero && (UnsafeNativeMethods.IsWinEventHookInstalled(NativeMethods.EVENT_OBJECT_FOCUS) || UnsafeNativeMethods.IsWinEventHookInstalled(NativeMethods.EVENT_OBJECT_STATECHANGE)))
3462if (popupRootAutomationPeer.Hwnd == IntPtr.Zero)
3465IntPtr lResult = AutomationInteropProvider.ReturnRawElementProvider(Handle, IntPtr.Zero, new IntPtr(NativeMethods.OBJID_CLIENT), RootProviderForHwnd);
3466if (lResult != IntPtr.Zero)
3471hr = UnsafeNativeMethods.ObjectFromLresult(lResult, ref iid, IntPtr.Zero, ref acc);
3550return DpiUtil.GetProcessDpiAwareness(IntPtr.Zero) == NativeMethods.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE;
System\Windows\Documents\ImmComposition.cs (22)
202IntPtr hwnd = IntPtr.Zero;
207if (himc != IntPtr.Zero)
340IntPtr lret = IntPtr.Zero;
419if (himc == IntPtr.Zero)
430size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_RESULTSTR, IntPtr.Zero, 0);
447size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPSTR, IntPtr.Zero, 0);
461cursorPos = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_CURSORPOS, IntPtr.Zero, 0);
469deltaStart = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_DELTASTART, IntPtr.Zero, 0);
477size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPATTR, IntPtr.Zero, 0);
593if (himc != IntPtr.Zero)
775if (himc != IntPtr.Zero)
1298IntPtr lret = IntPtr.Zero;
1333return IntPtr.Zero;
1355if (lParam != IntPtr.Zero)
1515return IntPtr.Zero;
1520return IntPtr.Zero;
1529return IntPtr.Zero;
1748IntPtr hwnd = IntPtr.Zero;
1754IntPtr lret = IntPtr.Zero;
1755if (himc != IntPtr.Zero)
1757IntPtr hwndDefIme = IntPtr.Zero;
1763return (lret != IntPtr.Zero) ? true : false;
System\Windows\Interop\HwndHost.cs (33)
311if (Handle != IntPtr.Zero && (hwndFocus.Handle == _hwnd.Handle || UnsafeNativeMethods.IsChild(_hwnd, hwndFocus)))
348if (( CriticalHandle != IntPtr.Zero) && IsVisible)
565_hwnd = new HandleRef(null, IntPtr.Zero);
623return IntPtr.Zero ;
638IntPtr result = IntPtr.Zero;
667new HandleRef(null, IntPtr.Zero),
705if(CriticalHandle != IntPtr.Zero)
737if(Handle != IntPtr.Zero)
744HandleRef hdcScreen = new HandleRef(this, UnsafeNativeMethods.GetDC(new HandleRef(this, IntPtr.Zero)));
745if(hdcScreen.Handle != IntPtr.Zero)
747HandleRef hdcBitmap = new HandleRef(this, IntPtr.Zero);
748HandleRef hBitmap = new HandleRef(this, IntPtr.Zero);
753if(hdcBitmap.Handle != IntPtr.Zero)
757if(hBitmap.Handle != IntPtr.Zero)
789UnsafeNativeMethods.CriticalRedrawWindow(_hwnd, IntPtr.Zero, IntPtr.Zero, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_ALLCHILDREN);
794System.Windows.Media.Imaging.BitmapSource bitmapSource = Imaging.CriticalCreateBitmapSourceFromHBitmap(hBitmap.Handle, IntPtr.Zero, Int32Rect.Empty, null, WICBitmapAlphaChannelOption.WICBitmapIgnoreAlpha);
809UnsafeNativeMethods.ReleaseDC(new HandleRef(this, IntPtr.Zero), hdcScreen);
810hdcScreen = new HandleRef(null, IntPtr.Zero);
812if(hBitmap.Handle != IntPtr.Zero)
815hBitmap = new HandleRef(this, IntPtr.Zero);
818if(hdcBitmap.Handle != IntPtr.Zero)
821hdcBitmap = new HandleRef(this, IntPtr.Zero);
935IntPtr hwndParent = IntPtr.Zero;
961if(hwndParent != IntPtr.Zero)
963if(_hwnd.Handle == IntPtr.Zero)
979else if (Handle != IntPtr.Zero)
1022if(_hwnd.Handle == IntPtr.Zero || !UnsafeNativeMethods.IsWindow(_hwnd))
1088if( CriticalHandle == IntPtr.Zero)
1104_hwnd = new HandleRef(null, IntPtr.Zero);
1119if(_hwnd.Handle != IntPtr.Zero)
1123_hwnd = new HandleRef(null, IntPtr.Zero);
1133IntPtr result = IntPtr.Zero ;
System\Windows\MessageBox.cs (8)
103return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, defaultResult, options);
118return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, defaultResult, 0);
132return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, 0, 0);
145return ShowCore(IntPtr.Zero, messageBoxText, caption, button, MessageBoxImage.None, 0, 0);
155return ShowCore(IntPtr.Zero, messageBoxText, caption, MessageBoxButton.OK, MessageBoxImage.None, 0, 0);
165return ShowCore(IntPtr.Zero, messageBoxText, String.Empty, MessageBoxButton.OK, MessageBoxImage.None, 0, 0);
380if (owner != IntPtr.Zero)
387if (owner == IntPtr.Zero)
System\Windows\Shell\WindowChromeWorker.cs (27)
169if (IntPtr.Zero != _hwnd)
240if (_chromeInfo != null && _hwnd != IntPtr.Zero)
256if (_hwnd == IntPtr.Zero || _hwndSource.IsDisposed)
280NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
535return IntPtr.Zero;
620IntPtr retVal = IntPtr.Zero;
696if (IntPtr.Zero != lRet)
721return IntPtr.Zero;
741return IntPtr.Zero;
770return IntPtr.Zero;
778return IntPtr.Zero;
790return IntPtr.Zero;
817return IntPtr.Zero;
837return IntPtr.Zero;
851return IntPtr.Zero;
921if (IntPtr.Zero != hmenu)
964if (IntPtr.Zero == _hwnd || _hwndSource.IsDisposed)
986NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
992NativeMethods.SetWindowRgn(_hwnd, IntPtr.Zero, NativeMethods.IsWindowVisible(_hwnd));
1028IntPtr hrgn = IntPtr.Zero;
1033hrgn = IntPtr.Zero;
1060IntPtr hrgn = IntPtr.Zero;
1110hrgn = IntPtr.Zero;
1146IntPtr hrgn = IntPtr.Zero;
1194if (IntPtr.Zero == _hwnd)
1403if (!Utility.IsOSVistaOrNewer || _hwnd == IntPtr.Zero)
1421NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
System\Windows\Standard\NativeMethods.cs (28)
1419if (!_hwnd.HasValue || _hwnd.Value == IntPtr.Zero)
1434dc = NativeMethods.CreateDC(deviceName, null, IntPtr.Zero, IntPtr.Zero);
1459IntPtr hPtr = IntPtr.Zero;
1513return GetDC(IntPtr.Zero);
1525_hwnd = IntPtr.Zero,
1583handle = IntPtr.Zero;
1620handle = IntPtr.Zero;
2392IntPtr argv = IntPtr.Zero;
2398if (argv == IntPtr.Zero)
2416Assert.AreEqual(IntPtr.Zero, p);
2435hBitmap = _CreateDIBSectionIntPtr(IntPtr.Zero, ref bitmapInfo, DIB_RGB_COLORS, out ppvBits, hSection, dwOffset);
2458if (IntPtr.Zero == ret)
2473if (IntPtr.Zero == ret)
2488if (IntPtr.Zero == ret)
2531if (IntPtr.Zero == ret)
2801if (retPtr == IntPtr.Zero)
2830if (retPtr == IntPtr.Zero)
2849IntPtr ret = IntPtr.Zero;
2858if (IntPtr.Zero == ret)
3017if (ret == IntPtr.Zero)
3182if (ret == IntPtr.Zero)
3197if (ret == IntPtr.Zero)
3292if (!_UpdateLayeredWindowIntPtr(hwnd, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, crKey, ref pblend, dwFlags))
System\Windows\SystemCommands.cs (5)
34if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd))
39NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero);
83if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd))
90uint cmd = NativeMethods.TrackPopupMenuEx(hmenu, TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD, (int)physicalScreenLocation.X, (int)physicalScreenLocation.Y, hwnd, IntPtr.Zero);
93NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr(cmd), IntPtr.Zero);
System\Windows\Window.cs (45)
267UnsafeNativeMethods.SendMessage( CriticalHandle, WindowMessage.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_MOUSEMOVE, IntPtr.Zero);
268UnsafeNativeMethods.SendMessage( CriticalHandle, WindowMessage.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero);
309_dialogOwnerHandle = IntPtr.Zero;
319if (_dialogOwnerHandle == IntPtr.Zero)
326if ((_dialogOwnerHandle != IntPtr.Zero) &&
329_dialogOwnerHandle = IntPtr.Zero;
334if (_dialogOwnerHandle != IntPtr.Zero)
339while (_dialogOwnerHandle != IntPtr.Zero)
376if (hWndCapture != IntPtr.Zero)
444if ( (_dialogPreviousActiveHandle != IntPtr.Zero) &&
1245SetOwnerHandle(_ownerWindow != null ? _ownerWindow.CriticalHandle: IntPtr.Zero);
2749new HandleRef(null, IntPtr.Zero),
2832new HandleRef(null, IntPtr.Zero),
2933new HandleRef(null, IntPtr.Zero),
3107return IntPtr.Zero;
3699IntPtr hMonitor = IntPtr.Zero;
3700if ((_ownerHandle == IntPtr.Zero) ||
3712if (hMonitor != IntPtr.Zero)
3736if (Owner.CriticalHandle == IntPtr.Zero)
3754if ((_ownerHandle != IntPtr.Zero) && UnsafeNativeMethods.IsWindow(new HandleRef(null, _ownerHandle)))
3793Debug.Assert(hMonitor != IntPtr.Zero);
3802if (hMonitor == IntPtr.Zero)
4080if (_ownerHandle == ownerHandle && _ownerHandle == IntPtr.Zero)
4088_ownerHandle = (IntPtr.Zero == ownerHandle && !ShowInTaskbar)
4161IntPtr retInt = IntPtr.Zero ;
4394(_dialogPreviousActiveHandle != IntPtr.Zero) &&
5912if (hMonitor != IntPtr.Zero)
6153new HandleRef(null, IntPtr.Zero),
6273IntPtr.Zero,
6296if (_ownerHandle == IntPtr.Zero)
6318SetOwnerHandle(IntPtr.Zero);
6326UnsafeNativeMethods.PostMessage(new HandleRef(this, CriticalHandle), WM_APPLYTASKBARITEMINFO, IntPtr.Zero, IntPtr.Zero);
6661nativeTB.hIcon = IntPtr.Zero;
6778if (manager.Dirty && CriticalHandle != IntPtr.Zero)
6848SetOwnerHandle(IntPtr.Zero);
7160private IntPtr _ownerHandle = IntPtr.Zero; // no need to dispose this
7209private IntPtr _dialogOwnerHandle = IntPtr.Zero;
7311return IntPtr.Zero;
7328if ( monitor != IntPtr.Zero )
7738return DpiUtil.GetProcessDpiAwareness(IntPtr.Zero) == NativeMethods.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE;
7753var nullHandle = new HandleRef(null, IntPtr.Zero);
7757IntPtr.Zero,
7759IntPtr.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)
54return IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (9)
743Debug.Assert(eventHandle != IntPtr.Zero);
1862decoded = dataPointer == IntPtr.Zero ? null : new string((char*)dataPointer, 0, (data->Size >> 1) - 1);
2083args[i] = dataPointer == IntPtr.Zero ? null : new string((char*)dataPointer, 0, (data->Size >> 1) - 1);
2193m_etwProvider?.WriteEvent(ref descr, IntPtr.Zero, null, null, 1, (IntPtr)((void*)&data));
2197if (m_writeEventStringEventHandle == IntPtr.Zero)
2206if (m_writeEventStringEventHandle == IntPtr.Zero)
2879if (!m_etwProvider.WriteEvent(ref manifestDescr, IntPtr.Zero, null, null, 2, (IntPtr)dataDescrs))
3458metadata.EventHandle = IntPtr.Zero;
3827private IntPtr m_writeEventStringEventHandle = 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)
31return Interop.Kernel32.GetCalendarInfoEx(localeName, (uint)calendar, IntPtr.Zero, calType | CAL_RETURN_NUMBER, IntPtr.Zero, 0, out data) != 0;
41int 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);