2607 references to Zero
Microsoft.AspNetCore.Cryptography.Internal (10)
Cng\BCryptUtil.cs (1)
21hAlgorithm: IntPtr.Zero,
SafeHandles\BCryptAlgorithmHandle.cs (2)
32int ntstatus = UnsafeNativeMethods.BCryptCreateHash(this, out retVal, IntPtr.Zero, 0, pbKey, cbKey, dwFlags: 0); 55int ntstatus = UnsafeNativeMethods.BCryptGenerateSymmetricKey(this, out retVal, IntPtr.Zero, 0, pbSecret, cbSecret, 0);
SafeHandles\BCryptHashHandle.cs (1)
21int ntstatus = UnsafeNativeMethods.BCryptDuplicateHash(this, out duplicateHandle, IntPtr.Zero, 0, 0);
SafeHandles\NCryptDescriptorHandle.cs (1)
24pMemPara: IntPtr.Zero,
SafeHandles\SafeLibraryHandle.cs (4)
29return (pfnProc != IntPtr.Zero); 68Arguments: IntPtr.Zero /* unused */); 91if (pfnProc == IntPtr.Zero) 113SafeLibraryHandle handle = UnsafeNativeMethods.LoadLibraryEx(filename, IntPtr.Zero, LOAD_LIBRARY_SEARCH_SYSTEM32);
UnsafeBufferUtil.cs (1)
80if (length == IntPtr.Zero)
Microsoft.AspNetCore.Cryptography.Internal.Tests (4)
Cng\BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO_Tests.cs (4)
20Assert.Equal(IntPtr.Zero, (IntPtr)cipherModeInfo.pbNonce); 22Assert.Equal(IntPtr.Zero, (IntPtr)cipherModeInfo.pbAuthData); 24Assert.Equal(IntPtr.Zero, (IntPtr)cipherModeInfo.pbTag); 26Assert.Equal(IntPtr.Zero, (IntPtr)cipherModeInfo.pbMacContext);
Microsoft.AspNetCore.DataProtection (13)
Cng\DpapiSecretSerializerHelper.cs (13)
90szDataDescr: IntPtr.Zero, 92pvReserved: IntPtr.Zero, 93pPromptStruct: IntPtr.Zero, 157pMemPara: IntPtr.Zero, 158hWnd: IntPtr.Zero, 233ppszDataDescr: IntPtr.Zero, 235pvReserved: IntPtr.Zero, 236pPromptStruct: IntPtr.Zero, 280phDescriptor: IntPtr.Zero, 284pMemPara: IntPtr.Zero, 285hWnd: IntPtr.Zero, 345pMemPara: IntPtr.Zero, 346hWnd: IntPtr.Zero,
Microsoft.AspNetCore.DataProtection.Tests (2)
Cng\CngAuthenticatedEncryptorBaseTests.cs (2)
49Assert.NotEqual(IntPtr.Zero, pbAdditionalAuthenticatedData); // CNG will complain if this pointer is zero 73Assert.NotEqual(IntPtr.Zero, pbCiphertext); // CNG will complain if this pointer is zero
Microsoft.AspNetCore.InternalTesting (2)
DumpCollector\DumpCollector.Windows.cs (2)
23if (!NativeMethods.MiniDumpWriteDump(process.Handle, (uint)process.Id, stream.SafeFileHandle, NativeMethods.MINIDUMP_TYPE.MiniDumpWithFullMemory, ref exceptionInfo, IntPtr.Zero, IntPtr.Zero))
Microsoft.AspNetCore.Server.HttpSys (19)
NativeInterop\SafeLibraryHandle.cs (3)
27return (pfnProc != IntPtr.Zero); 36if (pfnProc == IntPtr.Zero) 58SafeLibraryHandle handle = UnsafeNativeMethods.LoadLibraryEx(filename, IntPtr.Zero, LOAD_LIBRARY_SEARCH_SYSTEM32);
NativeInterop\SafeNativeOverlapped.cs (5)
18: base(IntPtr.Zero, true) 23: base(IntPtr.Zero, true) 31get { return handle == IntPtr.Zero; } 38IntPtr oldHandle = Interlocked.Exchange(ref handle, IntPtr.Zero); 41if (oldHandle != IntPtr.Zero && !HasShutdownStarted)
NativeInterop\UrlGroup.cs (1)
89Debug.Assert(info != IntPtr.Zero, "SetUrlGroupProperty called with invalid pointer");
RequestProcessing\RequestContext.cs (2)
228IntPtr.Zero); 252(uint)sizeof(HTTP_REQUEST_PROPERTY_STREAM_ERROR), IntPtr.Zero);
RequestProcessing\Response.cs (4)
334IntPtr.Zero, 337IntPtr.Zero); 352IntPtr.Zero, 355IntPtr.Zero);
RequestProcessing\ResponseBody.cs (4)
364IntPtr.Zero, 367IntPtr.Zero); 687IntPtr.Zero, 690IntPtr.Zero);
Microsoft.AspNetCore.Server.IIS (15)
Core\IISConfigurationData.cs (9)
41native.pwzFullApplicationPath = managed.pwzFullApplicationPath is null ? IntPtr.Zero : Marshal.StringToBSTR(managed.pwzFullApplicationPath); 42native.pwzVirtualApplicationPath = managed.pwzVirtualApplicationPath is null ? IntPtr.Zero : Marshal.StringToBSTR(managed.pwzVirtualApplicationPath); 46native.pwzBindings = managed.pwzBindings is null ? IntPtr.Zero : Marshal.StringToBSTR(managed.pwzBindings); 53if (native.pwzFullApplicationPath != IntPtr.Zero) 57if (native.pwzVirtualApplicationPath != IntPtr.Zero) 61if (native.pwzBindings != IntPtr.Zero) 72pwzFullApplicationPath = native.pwzFullApplicationPath == IntPtr.Zero ? string.Empty : Marshal.PtrToStringBSTR(native.pwzFullApplicationPath), 73pwzVirtualApplicationPath = native.pwzVirtualApplicationPath == IntPtr.Zero ? string.Empty : Marshal.PtrToStringBSTR(native.pwzVirtualApplicationPath), 77pwzBindings = native.pwzBindings == IntPtr.Zero ? string.Empty : Marshal.PtrToStringBSTR(native.pwzBindings),
Core\IISHttpContext.cs (2)
422IntPtr.Zero); 839if (token != IntPtr.Zero && authenticationType != null)
Core\NativeSafeHandle.cs (3)
13public override bool IsInvalid => handle == IntPtr.Zero; 16public NativeSafeHandle(IntPtr handle) : base(IntPtr.Zero, ownsHandle: true) 23handle = IntPtr.Zero;
NativeMethods.cs (1)
32return GetModuleHandle(AspNetCoreModuleDll) != IntPtr.Zero;
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (6)
IISExpressDeployer.cs (3)
520if (!WindowsNativeMethods.PostMessage(hWnd, 0x12, IntPtr.Zero, IntPtr.Zero)) 530}, IntPtr.Zero);
ProcessTracker.cs (3)
20return IntPtr.Zero; 24var jobHandle = CreateJobObject(IntPtr.Zero, name: $"ProcessTracker{Environment.ProcessId}"); 56if (_jobHandle != IntPtr.Zero)
Microsoft.Build (3)
BackEnd\Components\Communications\NodeLauncher.cs (2)
179if (processInfo.hProcess != IntPtr.Zero && processInfo.hProcess != NativeMethods.InvalidHandle) 184if (processInfo.hThread != IntPtr.Zero && processInfo.hThread != NativeMethods.InvalidHandle)
BackEnd\Node\NativeMethods.cs (1)
20internal static readonly IntPtr NullPtr = IntPtr.Zero;
Microsoft.Build.Engine (3)
LocalProvider\NativeMethods.cs (1)
16internal static readonly IntPtr NullPtr = IntPtr.Zero;
LocalProvider\SharedMemory.cs (1)
156IntPtr pSDNative = IntPtr.Zero;
Shared\NativeMethodsShared.cs (1)
32internal static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero);
Microsoft.Build.Engine.UnitTests (2)
BackEnd\TargetUpToDateChecker_Tests.cs (2)
1004NativeMethodsShared.FILE_SHARE_READ, IntPtr.Zero, NativeMethodsShared.OPEN_EXISTING, 1006IntPtr.Zero))
Microsoft.Build.Framework (7)
NativeMethods.cs (6)
59internal static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 520if (!GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP.RelationProcessorCore, IntPtr.Zero, ref len) && 1103IntPtr.Zero, 1106IntPtr.Zero); 1397int bufferSize = GetFullPathWin32(path, 0, null, IntPtr.Zero); 1399int fullPathLength = GetFullPathWin32(path, bufferSize, buffer, IntPtr.Zero);
VisualStudioLocationHelper.cs (1)
98var result = GetSetupConfiguration(out query, IntPtr.Zero);
Microsoft.Build.Tasks.Core (33)
BootstrapperUtil\ResourceUpdater.cs (4)
45IntPtr hUpdate = IntPtr.Zero; 50while (IntPtr.Zero == hUpdate && Marshal.GetHRForLastWin32Error() == ERROR_SHARING_VIOLATION && beginUpdateRetries > 0) // If it equals 0x80070020 (ERROR_SHARING_VIOLATION), sleep & retry 59if (IntPtr.Zero == hUpdate) 68if (hUpdate != IntPtr.Zero)
ManifestUtil\ComImporter.cs (3)
48if (NativeMethods.SfcIsFileProtected(IntPtr.Zero, path) != 0) 65IntPtr typeLibAttrPtr = IntPtr.Zero; 89IntPtr tinfoAttrPtr = IntPtr.Zero;
ManifestUtil\EmbeddedManifestReader.cs (6)
20IntPtr hModule = IntPtr.Zero; 23hModule = NativeMethods.LoadLibraryExW(path, IntPtr.Zero, NativeMethods.LOAD_LIBRARY_AS_DATAFILE); 24if (hModule == IntPtr.Zero) 29NativeMethods.EnumResourceNames(hModule, NativeMethods.RT_MANIFEST, callback, IntPtr.Zero); 33if (hModule != IntPtr.Zero) 47if (hResInfo == IntPtr.Zero)
ManifestUtil\mansign2.cs (12)
812IntPtr ppTsContext = IntPtr.Zero; 813IntPtr ppTsSigner = IntPtr.Zero; 814IntPtr phStore = IntPtr.Zero; 843pszTSAPolicyId = IntPtr.Zero, 874if (ppTsContext != IntPtr.Zero) 879if (ppTsSigner != IntPtr.Zero) 884if (phStore != IntPtr.Zero) 1303if (signerInfo.pChainContext != IntPtr.Zero) 1309if (signerInfo.pwszHash != IntPtr.Zero) 1313if (signerInfo.pwszDescription != IntPtr.Zero) 1317if (signerInfo.pwszDescriptionUrl != IntPtr.Zero) 1424if (timestamperInfo.pChainContext != IntPtr.Zero)
ManifestUtil\SecurityUtil.cs (3)
682IntPtr hModule = IntPtr.Zero; 728hModule = NativeMethods.LoadLibraryExW(Path.Combine(clrDllDir, "clr.dll"), IntPtr.Zero, NativeMethods.LOAD_LIBRARY_AS_DATAFILE); 754if (hModule != IntPtr.Zero)
NativeMethods.cs (5)
527internal static readonly IntPtr NullPtr = IntPtr.Zero; 807hardLinkCreated = CreateHardLink(newFileName, exitingFileName, IntPtr.Zero /* reserved, must be NULL */); 1298IntPtr.Zero); 1305IntPtr.Zero, 1308IntPtr.Zero);
Microsoft.Build.Tasks.UnitTests (5)
MockUnmanagedMemoryHelper.cs (5)
22private IntPtr _mainAllocationHandle = IntPtr.Zero; 45if (_mainAllocationHandle != IntPtr.Zero) 90Assert.Equal(IntPtr.Zero, _mainAllocationHandle); 100Assert.NotEqual(IntPtr.Zero, _mainAllocationHandle); 102_mainAllocationHandle = IntPtr.Zero;
Microsoft.Build.UnGAC (1)
Program.cs (1)
44hresult = assemblyCache.UninstallAssembly(dwFlags: 0, pszAssemblyName: assembly, pRefData: IntPtr.Zero, pulDisposition: 0);
Microsoft.Build.Utilities.UnitTests (1)
NativeMethods.cs (1)
20internal static readonly IntPtr NullPtr = IntPtr.Zero;
Microsoft.DotNet.RemoteExecutor (3)
MiniDump.cs (3)
31if (MiniDumpWriteDump(process.SafeHandle, process.Id, fs.SafeFileHandle, MiniDumpType, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero) == 0)
Microsoft.DotNet.SignCheckLibrary (23)
Interop\StructuredStorage.cs (4)
44int hresult = Ole32.StgOpenStorage(filename, null, STGM.STGM_READ | STGM.STGM_SHARE_EXCLUSIVE, IntPtr.Zero, 0, out rootStorage); 53rootStorage.EnumElements(0, IntPtr.Zero, 0, out rootStorageEnum); 109rootStorage.OpenStorage(storageName, null, (STGM.STGM_READ | STGM.STGM_SHARE_EXCLUSIVE), IntPtr.Zero, 0, out stg); 126stg.CopyTo(0, null, IntPtr.Zero, fileStg);
Verification\AuthentiCode.cs (11)
25hFile = IntPtr.Zero, 26pgKnownSubject = IntPtr.Zero 38hWVTStateData = IntPtr.Zero, 40pPolicyCallbackData = IntPtr.Zero, 41pSIPClientData = IntPtr.Zero, 42pwszURLReference = IntPtr.Zero 53uint result = WinTrust.WinVerifyTrust(IntPtr.Zero, pGuid, pData); 107IntPtr certStore = IntPtr.Zero; 108IntPtr msg = IntPtr.Zero; 109IntPtr context = IntPtr.Zero; 130if (!WinCrypt.CryptMsgGetParam(msg, WinCrypt.CMSG_ENCODED_MESSAGE, 0, IntPtr.Zero, ref cbData))
Verification\StrongName.cs (1)
30IntPtr tokenPtr = IntPtr.Zero;
Verification\VsixVerifier.cs (7)
70IntPtr TSContextPtr = IntPtr.Zero; 71IntPtr TSSignerPtr = IntPtr.Zero; 72IntPtr StoreHandle = IntPtr.Zero; 79IntPtr.Zero, 105if (IntPtr.Zero != TSContextPtr) 109if (IntPtr.Zero != TSSignerPtr) 113if (IntPtr.Zero != StoreHandle)
MSBuildTaskHost (6)
NativeMethods.cs (6)
59internal static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 520if (!GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP.RelationProcessorCore, IntPtr.Zero, ref len) && 1103IntPtr.Zero, 1106IntPtr.Zero); 1397int bufferSize = GetFullPathWin32(path, 0, null, IntPtr.Zero); 1399int fullPathLength = GetFullPathWin32(path, bufferSize, buffer, IntPtr.Zero);
PresentationCore (440)
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))
MS\Internal\DpiUtil\DpiUtil+DpiAwarenessScope.cs (3)
34hWnd: IntPtr.Zero) 53hWnd: IntPtr.Zero) 111(hWnd == IntPtr.Zero || !this.IsWindowUnawareOrSystemAware(hWnd)))
MS\Internal\DpiUtil\DpiUtil+HwndDpiInfo.cs (2)
48ContainingMonitorScreenRect = NearestMonitorInfoFromWindow(IntPtr.Zero).rcMonitor; 58if (hMonitor == IntPtr.Zero)
MS\Internal\DpiUtil\DpiUtil+ProcessDpiAwarenessHelper.cs (1)
94if (hWnd != IntPtr.Zero)
MS\Internal\DpiUtil\DpiUtil+SystemDpiHelper.cs (4)
109HandleRef hWndDesktop = new HandleRef(IntPtr.Zero, IntPtr.Zero); 110HandleRef hDC = new HandleRef(IntPtr.Zero, UnsafeNativeMethods.GetDC(hWndDesktop)); 111if (hDC.Handle == IntPtr.Zero)
MS\Internal\DpiUtil\DpiUtil+WindowDpiScaleHelper.cs (3)
83uint dpi = SafeNativeMethods.GetDpiForWindow(new HandleRef(IntPtr.Zero, hWnd)); 95SafeNativeMethods.MonitorFromWindow(new HandleRef(IntPtr.Zero, hWnd), NativeMethods.MONITOR_DEFAULTTONEAREST); 98int hr = (int)UnsafeNativeMethods.GetDpiForMonitor(new HandleRef(IntPtr.Zero, hMon), MONITOR_DPI_TYPE.MDT_EFFECTIVE_DPI, out dpiX, out dpiY);
MS\Internal\FontCache\FontCacheUtil.cs (5)
372HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 378if (dc == IntPtr.Zero) 855IntPtr.Zero 883_viewHandle = UnsafeNativeMethods.MapViewOfFileEx(_mappingHandle, UnsafeNativeMethods.FILE_MAP_READ, 0, 0, IntPtr.Zero, IntPtr.Zero);
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (17)
350if ( hModule != IntPtr.Zero ) 353new HandleRef(null, hModule), "GetAlternateList") != IntPtr.Zero ? 357return hModule != IntPtr.Zero ? true : false; 423IntPtr packets = IntPtr.Zero; 429if (packets == IntPtr.Zero) 466packets = IntPtr.Zero; 569if ( pd.pPacketProperties != IntPtr.Zero ) 584pd.pPacketProperties = IntPtr.Zero; 587if ( pd.pguidButtons != IntPtr.Zero ) 590pd.pguidButtons = IntPtr.Zero; 593if ( packets != IntPtr.Zero ) 596packets = IntPtr.Zero; 652if (pRecoAlternates[i] != IntPtr.Zero) 656pRecoAlternates[i] = IntPtr.Zero; 673IntPtr ptr = IntPtr.Zero; 687Debug.Assert(!(bestResultColumnCount != 0 && pRecoLattice->pLatticeColumns == IntPtr.Zero), "Invalid results!"); 688if ( bestResultColumnCount > 0 && pRecoLattice->pLatticeColumns != IntPtr.Zero )
MS\Internal\Interop\NativePointerCriticalHandle.cs (3)
13: base(IntPtr.Zero) 18public override bool IsInvalid => handle == IntPtr.Zero; 35handle = IntPtr.Zero;
MS\Internal\SystemDrawingHelper.cs (4)
43return (extensions != null) ? extensions.GetHandleFromMetafile(data) : IntPtr.Zero; 71return IntPtr.Zero; 78return (extensions != null) ? extensions.GetHBitmapFromBitmap(data) : IntPtr.Zero; 85return (extensions != null) ? extensions.ConvertMetafileToHBitmap(handle) : IntPtr.Zero;
MS\Internal\Text\TextInterface\DWriteLoader.cs (4)
21if (_dwrite == IntPtr.Zero) 34if (_dwrite != IntPtr.Zero) 38_dwrite = IntPtr.Zero; 56if (hDWriteLibrary != IntPtr.Zero)
MS\Internal\TextFormatting\FullTextBreakpoint.cs (5)
84TextFormatterContext context = settings.Formatter.AcquireContext(fullText, IntPtr.Zero); 86IntPtr previousBreakRecord = IntPtr.Zero; 216if(_ploline.Value != IntPtr.Zero) 219_ploline.Value = IntPtr.Zero; 220_penaltyResource.Value = IntPtr.Zero;
MS\Internal\TextFormatting\FullTextLine.cs (16)
159if (_ploline.Value != System.IntPtr.Zero) 163_ploline.Value = System.IntPtr.Zero; 181_ploline = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 229TextFormatterContext context = _metrics._formatter.AcquireContext(fullText, IntPtr.Zero); 250IntPtr.Zero, // single-line formatting does not require break record 281IntPtr.Zero, // single-line formatting does not require break record 595if (_ploline.Value != System.IntPtr.Zero) 867if(_ploline.Value == IntPtr.Zero) 1002if (_ploline.Value == IntPtr.Zero) 1150if (_ploline.Value == System.IntPtr.Zero) 1243if (_ploline.Value == IntPtr.Zero) 1520if (_ploline.Value == IntPtr.Zero) 2132if (_ploline.Value != System.IntPtr.Zero) 2200return _metrics.GetTextLineBreak(IntPtr.Zero); 2455Debug.Assert(_ploline.Value != IntPtr.Zero); 2508Debug.Assert(_ploline.Value != IntPtr.Zero);
MS\Internal\TextFormatting\TextFormatterImp.cs (1)
539if (ploc == IntPtr.Zero)
MS\Internal\TextFormatting\TextMetrics.cs (3)
303IntPtr pbreakrec = IntPtr.Zero; 305if (ploline != IntPtr.Zero) 324return (pbreakrec != IntPtr.Zero) ? new TextLineBreak(null, new SecurityCriticalDataForSet<IntPtr>(pbreakrec)) : null;
MS\Internal\TextFormatting\TextPenaltyModule.cs (2)
78if (_ploPenaltyModule.Value != IntPtr.Zero) 81_ploPenaltyModule.Value = IntPtr.Zero;
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\InputPaneRcw.cs (1)
27IntPtr hstring = IntPtr.Zero;
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\UISettingsRcw.cs (1)
20IntPtr hstring = IntPtr.Zero;
MS\Win32\UnsafeNativeMethodsPenimc.cs (5)
82private static IntPtr _pimcActCtxCookie = IntPtr.Zero; 107if (_pimcActCtxCookie == IntPtr.Zero) 113if ((_pimcActCtxCookie = RegisterDllForSxSCOM()) == IntPtr.Zero) 125if (_pimcActCtxCookie != IntPtr.Zero) 129_pimcActCtxCookie = IntPtr.Zero;
MS\Win32\UnsafeNativeMethodsTablet.cs (6)
79: base(IntPtr.Zero, ownHandle) 90return IsClosed || handle == IntPtr.Zero; 96Debug.Assert(handle != IntPtr.Zero); 114: base(IntPtr.Zero, ownHandle) 125return IsClosed || handle == IntPtr.Zero; 136Debug.Assert(handle != IntPtr.Zero);
src\Microsoft.DotNet.Wpf\src\Common\Graphics\exports.cs (19)
358IntPtr referenceChannelHandle = IntPtr.Zero; 382if (_hChannel == IntPtr.Zero) 403if (_hChannel == IntPtr.Zero) 425if (_hChannel == IntPtr.Zero) 445if (_hChannel != IntPtr.Zero) 453if (_hChannel != IntPtr.Zero) 457_hChannel = IntPtr.Zero; 481Invariant.Assert(_hChannel != IntPtr.Zero); 540Invariant.Assert(_hChannel != IntPtr.Zero); 570Invariant.Assert(_hChannel != IntPtr.Zero); 603Invariant.Assert(_hChannel != IntPtr.Zero); 664if (_hChannel == IntPtr.Zero) 700if (_hChannel == IntPtr.Zero) 736if (_hChannel == IntPtr.Zero) 763if (_hChannel == IntPtr.Zero) 787Invariant.Assert(_hChannel != IntPtr.Zero); 806Invariant.Assert(_hChannel != IntPtr.Zero); 830Invariant.Assert(_hChannel != IntPtr.Zero); 873Invariant.Assert(_hChannel != IntPtr.Zero);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\MimeTypeMapper.cs (1)
92IntPtr.Zero,
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
56int retval = MS.Internal.WindowsBase.NativeMethodsSetLastError.MapWindowPoints(hwnd , new HandleRef(null, IntPtr.Zero), ref rcWindowCoords, 2);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\LoadLibraryHelper.cs (3)
33var hModule = IntPtr.Zero; 38hModule != IntPtr.Zero) 43UnsafeNativeMethods.GetProcAddressNoThrow(new HandleRef(null, hModule), AddDllDirectoryName) != IntPtr.Zero;
System\Windows\Automation\Peers\AutomationPeer.cs (4)
233_hwnd = IntPtr.Zero; 475if (_parent != null && _hwnd != IntPtr.Zero) return this; 477if((connectedPeer._hwnd) != IntPtr.Zero) 521if(peer._hwnd == IntPtr.Zero)
System\Windows\Automation\Peers\GenericRootAutomationPeer.cs (2)
50if(hwnd != IntPtr.Zero) 81if(hwnd != IntPtr.Zero)
System\Windows\clipboard.cs (5)
560IntPtr hModule = IntPtr.Zero; 563hModule = LoadLibraryHelper.SecureLoadLibraryEx(ExternDll.Wldp, IntPtr.Zero, UnsafeNativeMethods.LoadLibraryFlags.LOAD_LIBRARY_SEARCH_SYSTEM32); 564if (hModule != IntPtr.Zero) 567if (entryPoint != IntPtr.Zero) 583if (hModule != IntPtr.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\DragDrop.cs (3)
456if (windowHandle != IntPtr.Zero) 477if (windowHandle != IntPtr.Zero) 899if (handle == IntPtr.Zero)
System\Windows\Input\AccessKeyManager.cs (2)
478if (hwnd != IntPtr.Zero) 487if (hwnd != IntPtr.Zero)
System\Windows\Input\Cursor.cs (4)
178_cursorHandle = UnsafeNativeMethods.LoadImageCursor(IntPtr.Zero, 255_cursorHandle = UnsafeNativeMethods.LoadImageCursor(IntPtr.Zero, 301_cursorHandle = UnsafeNativeMethods.LoadImageCursor(IntPtr.Zero, 324_cursorHandle = SafeNativeMethods.LoadCursor(new HandleRef(this,IntPtr.Zero), (IntPtr)(CursorTypes[(int)cursorType]));
System\Windows\Input\DefaultTextStore.cs (1)
89hwnd = IntPtr.Zero;
System\Windows\Input\InputElement.cs (2)
279if(sourceFrom != null && sourceFrom.CriticalHandle != IntPtr.Zero && sourceFrom.CompositionTarget != null && 280sourceTo != null && sourceTo.CriticalHandle != IntPtr.Zero && sourceTo.CompositionTarget != null)
System\Windows\Input\InputLanguageManager.cs (1)
262if (hkl == IntPtr.Zero)
System\Windows\Input\InputMethod.cs (14)
551if (hwnd != IntPtr.Zero) 586IntPtr hwnd = IntPtr.Zero; 589if (hwnd != IntPtr.Zero) 784if (hwnd != IntPtr.Zero) 831IntPtr hwnd = IntPtr.Zero; 924if (hwnd != IntPtr.Zero) 1042if (hwnd != IntPtr.Zero) 1116if (hwnd != IntPtr.Zero) 1293if (hkl == IntPtr.Zero) 1348if (DefaultImc != IntPtr.Zero) 1358UnsafeNativeMethods.ImmAssociateContext(new HandleRef(this, hwnd), new HandleRef(this, IntPtr.Zero)); 1417if (hwnd != IntPtr.Zero) 1538UnsafeNativeMethods.ImmConfigureIME(new HandleRef(this, hkl), new HandleRef(this, HwndFromInputElement(element)), NativeMethods.IME_CONFIG_GENERAL, IntPtr.Zero); 1756IntPtr hwnd = UnsafeNativeMethods.ImmGetDefaultIMEWnd(new HandleRef(this, IntPtr.Zero));
System\Windows\Input\MouseDevice.cs (6)
929IntPtr.Zero); 1309IntPtr.Zero); 1383IntPtr extraInformation = clearExtraInformation ? IntPtr.Zero : rawMouseInputReport.ExtraInformation; 2105IntPtr hwndHit = IntPtr.Zero ; 2114hwndHit = IntPtr.Zero; 2117if (hwndHit != IntPtr.Zero)
System\Windows\Input\Stylus\Pointer\PointerInteractionEngine.cs (5)
102private SecurityCriticalDataForSet<IntPtr> _interactionContext = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 178IntPtr interactionContext = IntPtr.Zero; 187if (_interactionContext.Value != IntPtr.Zero) 225if (_interactionContext.Value != IntPtr.Zero) 228_interactionContext.Value = IntPtr.Zero;
System\Windows\Input\Stylus\Pointer\PointerLogic.cs (1)
281IntPtr.Zero);
System\Windows\Input\Stylus\Wisp\PenContexts.cs (2)
39if(hwndSource == null || IntPtr.Zero == (hwndSource).CriticalHandle) 227if (_contexts != null && index <= _contexts.Length && _inputSource.Value.CriticalHandle != IntPtr.Zero)
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (2)
1045Debug.Assert(pc != null && pc.CommHandle != IntPtr.Zero); 1099Debug.Assert(pc != null && pc.CommHandle != IntPtr.Zero);
System\Windows\Input\Stylus\Wisp\WispLogic.cs (9)
575IntPtr.Zero); 648IntPtr hwnd = hwndSource != null ? hwndSource.CriticalHandle : IntPtr.Zero; 653if (hwnd != IntPtr.Zero && 655UnsafeNativeMethods.GetParent(new HandleRef(this, hwnd)) == IntPtr.Zero && 1299IntPtr.Zero); 1767actions, (int)pt.X, (int)pt.Y, 0, IntPtr.Zero); 2852IntPtr.Zero); 2932IntPtr hwndHit = IntPtr.Zero; 2940if (hwndHit != IntPtr.Zero)
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (2)
1574if (hwndHit != IntPtr.Zero) 1724(int)pt.X, (int)pt.Y, 0, IntPtr.Zero);
System\Windows\Input\Stylus\Wisp\WispTabletDevice.cs (1)
206result.CommHandle != null ? result.CommHandle.Value : IntPtr.Zero,
System\Windows\InterOp\D3DImage.cs (3)
155if (backBuffer != IntPtr.Zero && backBuffer == _pUserSurfaceUnsafe) 166if (backBuffer != IntPtr.Zero) 656img._pUserSurfaceUnsafe = IntPtr.Zero;
System\Windows\InterOp\HwndAppCommandInputProvider.cs (2)
50return IntPtr.Zero; 69return handled ? new IntPtr(1) : IntPtr.Zero ;
System\Windows\InterOp\HwndKeyboardInputProvider.cs (10)
74_restoreFocusWindow = IntPtr.Zero; 119result = focus != IntPtr.Zero; 170IntPtr result = IntPtr.Zero ; 358if (_restoreFocusWindow == IntPtr.Zero) 473if (_restoreFocusWindow != IntPtr.Zero) 476_restoreFocusWindow = IntPtr.Zero; 752if(hwnd != IntPtr.Zero) 788while (hwnd != IntPtr.Zero) 809return IntPtr.Zero; 848IntPtr extraInformation = IntPtr.Zero;
System\Windows\InterOp\HwndMouseInputProvider.cs (8)
329IntPtr result = IntPtr.Zero ; 757if(lParam != IntPtr.Zero || // someone else took capture 921if(hwndToCheck == IntPtr.Zero) 949hwndToCheck = IntPtr.Zero; 952if(hwndToCheck != IntPtr.Zero) 969hwndToCheck = IntPtr.Zero; 1196if(hwnd != IntPtr.Zero) 1417IntPtr extraInformation = IntPtr.Zero;
System\Windows\InterOp\HwndPanningFeedback.cs (1)
53if (handle != IntPtr.Zero)
System\Windows\InterOp\HwndPointerInputProvider.cs (1)
449return IntPtr.Zero;
System\Windows\InterOp\HwndSource.cs (17)
338if (_hwndWrapper.Handle != IntPtr.Zero) 682if (hwnd == IntPtr.Zero) 755UnsafeNativeMethods.HideCaret(new HandleRef(this, IntPtr.Zero)); 781UnsafeNativeMethods.ShowCaret(new HandleRef(this, IntPtr.Zero)); 844UnsafeNativeMethods.SetWindowPos(new HandleRef(this,_hwndWrapper.Handle), new HandleRef(null,IntPtr.Zero), 946return IntPtr.Zero; 970return _hwndWrapper.Handle == IntPtr.Zero ; 1180IntPtr result = IntPtr.Zero ; 1188if (result != IntPtr.Zero) 1200IntPtr result = IntPtr.Zero ; 1280if(wParam == IntPtr.Zero) 1293result = IntPtr.Zero; 1338result = IntPtr.Zero; 1548IntPtr hwndRoot = IntPtr.Zero; 1564IntPtr result = IntPtr.Zero ; 1645IntPtr result = IntPtr.Zero ; 2593if (_hwndWrapper.Handle != IntPtr.Zero && _registeredDropTargetCount > 0)
System\Windows\InterOp\HwndStylusInputProvider.cs (1)
82IntPtr result = IntPtr.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;
System\Windows\InterOp\Imaging.cs (3)
60if (bitmap == IntPtr.Zero) 83if (icon == IntPtr.Zero) 112if (section == IntPtr.Zero)
System\Windows\Media\ChannelManager.cs (3)
129if (_pSyncConnection != IntPtr.Zero) 132_pSyncConnection = IntPtr.Zero; 143if (_pSyncConnection == IntPtr.Zero)
System\Windows\Media\ColorContext.cs (2)
570HRESULT.Check(UnsafeNativeMethodsMilCoreApi.Mscms.GetStandardColorSpaceProfile(IntPtr.Zero, dwProfileID, buffer, out bufferSize)); 588HRESULT.Check(UnsafeNativeMethodsMilCoreApi.Mscms.GetColorDirectory(IntPtr.Zero, buffer, out bufferSize));
System\Windows\Media\ColorTransform.cs (2)
114IntPtr paInputColors = IntPtr.Zero; 115IntPtr paOutputColors = IntPtr.Zero;
System\Windows\Media\EventProxy.cs (2)
40Debug.Assert(((IntPtr)pEPD.m_handle) != IntPtr.Zero, "If this asserts fires: Why is it firing? It might be legal in future."); 117Debug.Assert(((IntPtr)epd.m_handle) != IntPtr.Zero, "Stream is disposed.");
System\Windows\Media\FactoryMaker.cs (7)
33if (s_pFactory == IntPtr.Zero) 81if (s_pImagingFactory != IntPtr.Zero) 86s_pFactory = IntPtr.Zero; 87s_pImagingFactory = IntPtr.Zero; 108Debug.Assert(s_pFactory != IntPtr.Zero); 117if (s_pImagingFactory == IntPtr.Zero) 124Debug.Assert(s_pImagingFactory != IntPtr.Zero);
System\Windows\Media\ImageSourceConverter.cs (1)
243if (addr == IntPtr.Zero)
System\Windows\Media\Imaging\BitmapDecoder.cs (15)
590IntPtr /* IWICBitmapSource */ thumbnail = IntPtr.Zero; 605if (thumbnail != IntPtr.Zero) 651IntPtr /* IWICMetadataQueryReader */ metadata = IntPtr.Zero; 665if (metadata != IntPtr.Zero) 744IntPtr /* IWICBitmapSource */ preview = IntPtr.Zero; 759if (preview != IntPtr.Zero) 1023IntPtr decoder = IntPtr.Zero; 1123IntPtr comStream = IntPtr.Zero; 1188Debug.Assert(decoder != IntPtr.Zero); 1525IntPtr comStream = IntPtr.Zero; 1533IntPtr bufferPtr = IntPtr.Zero; 1542if (bufferPtr != IntPtr.Zero) 1551if (comStream == IntPtr.Zero) 1563if (memoryStream != IntPtr.Zero) 1578if (comStream == IntPtr.Zero)
System\Windows\Media\Imaging\BitmapDownload.cs (1)
151IntPtr.Zero /* hTemplateFile */
System\Windows\Media\Imaging\BitmapEncoder.cs (2)
53pstrName = IntPtr.Zero; 360IntPtr comStream = IntPtr.Zero;
System\Windows\Media\Imaging\BitmapFrameDecode.cs (5)
589IntPtr /* IWICBitmapSource */ thumbnail = IntPtr.Zero; 607if (thumbnail != IntPtr.Zero) 650IntPtr /* IWICMetadataQueryReader */ metadata = IntPtr.Zero; 666if (metadata != IntPtr.Zero) 714IntPtr frameDecode = IntPtr.Zero;
System\Windows\Media\Imaging\BitmapMetadata.cs (29)
168IntPtr pIMetadataWriter = IntPtr.Zero; 180pIMetadataWriter = IntPtr.Zero; 186if (pIMetadataWriter != IntPtr.Zero) 226pIMetadataReader = IntPtr.Zero; 266Invariant.Assert(pIBlockReader != IntPtr.Zero); 288IntPtr pIMetadataWriter = IntPtr.Zero; 317pIMetadataWriter = IntPtr.Zero; 327if (pIMetadataWriter != IntPtr.Zero) 353pIMetadataWriter = IntPtr.Zero; 374if (pIMetadataWriter == IntPtr.Zero) 407if (pIMetadataWriter == IntPtr.Zero) 524rgelt = IntPtr.Zero; 531rgelt = IntPtr.Zero; 587ppEnum = IntPtr.Zero; 659IntPtr /* IWICMetadataQueryWriter */ queryWriter = IntPtr.Zero; 694IntPtr /* IWICMetadataBlockWriter */ blockWriter = IntPtr.Zero; 695IntPtr /* IWICMetadataQueryWriter */ queryWriter = IntPtr.Zero; 718queryWriter = IntPtr.Zero; 724if (blockWriter != IntPtr.Zero) 729if (queryWriter != IntPtr.Zero) 743IntPtr /* IWICMetadataBlockWriter */ blockWriter = IntPtr.Zero; 744IntPtr /* IWICMetadataQueryWriter */ queryWriter = IntPtr.Zero; 767queryWriter = IntPtr.Zero; 773if (blockWriter != IntPtr.Zero) 778if (queryWriter != IntPtr.Zero) 793IntPtr queryWriter = IntPtr.Zero; 819queryWriter = IntPtr.Zero; 830if (queryWriter != IntPtr.Zero) 1216IntPtr.Zero
System\Windows\Media\Imaging\BitmapMetadataEnumerator.cs (3)
69IntPtr ppStr = IntPtr.Zero; 100if (ppStr != IntPtr.Zero) 103ppStr = IntPtr.Zero;
System\Windows\Media\Imaging\BitmapSource.cs (5)
598IntPtr wicSource = IntPtr.Zero; 730if (buffer == IntPtr.Zero) 881new SafeMILHandle(IntPtr.Zero), 1823if (pvPixels == IntPtr.Zero) 1833if (prc == IntPtr.Zero)
System\Windows\Media\Imaging\BitmapSourceSafeMILHandle.cs (2)
74if (bitmapObject != IntPtr.Zero) 91Debug.Assert(wicBitmap != IntPtr.Zero);
System\Windows\Media\Imaging\BitmapVisualManager.cs (1)
109IntPtr pIRenderTargetBitmap = IntPtr.Zero;
System\Windows\Media\Imaging\PropVariant.cs (15)
148ca.pElems = IntPtr.Zero; 156IntPtr destPtr =IntPtr.Zero; 171destPtr = IntPtr.Zero; 180if (destPtr != IntPtr.Zero) 193ca.pElems = IntPtr.Zero; 199IntPtr destPtr = IntPtr.Zero; 210IntPtr pString = IntPtr.Zero; 229destPtr = IntPtr.Zero; 233if (destPtr != IntPtr.Zero) 427IntPtr punkTemp = IntPtr.Zero; 459if (ca.pElems != IntPtr.Zero) 718IntPtr queryHandle = IntPtr.Zero; 732queryHandle = IntPtr.Zero; 746queryHandle = IntPtr.Zero; 756if (queryHandle != IntPtr.Zero)
System\Windows\Media\Imaging\UnknownBitmapDecoder.cs (1)
39MS.Win32.PresentationCore.UnsafeNativeMethods.WICCodec.CoInitialize(IntPtr.Zero);
System\Windows\Media\Imaging\WriteableBitmap.cs (3)
284if (_backBuffer == IntPtr.Zero) 286IntPtr tempBackBufferPointer = IntPtr.Zero; 861if (sourceBuffer == IntPtr.Zero)
System\Windows\Media\MediaContextNotificationWindow.cs (3)
70hwndNotification = new HwndWrapper(0, NativeMethods.WS_POPUP, 0, 0, 0, 0, 0, "MediaContextNotificationWindow", IntPtr.Zero, null); 172return IntPtr.Zero; 202if (functionAddress != IntPtr.Zero)
System\Windows\Media\MediaSystem.cs (1)
247s_pConnection = IntPtr.Zero;
System\Windows\Media\PixelFormat.cs (7)
514Debug.Assert(pixelFormatInfo != IntPtr.Zero); 556if (pixelFormatInfo != IntPtr.Zero) 568IntPtr componentInfo = IntPtr.Zero; 569IntPtr pixelFormatInfo = IntPtr.Zero; 596if (componentInfo != IntPtr.Zero) 615Debug.Assert(pixelFormatInfo != IntPtr.Zero); 626if (pixelFormatInfo != IntPtr.Zero)
System\Windows\Media\SafeReversePInvokeHandle.cs (1)
54if (handle != IntPtr.Zero)
System\Windows\Media\StreamAsIStream.cs (10)
67Debug.Assert(((IntPtr)pSD.m_handle) != IntPtr.Zero, "If this asserts fires: why is it firing. It might be legal in future."); 169stream = IntPtr.Zero; 575Debug.Assert(((IntPtr)sd.m_handle) != IntPtr.Zero, "Stream is disposed."); 651IntPtr pIStream = IntPtr.Zero; 657return IntPtr.Zero; 664return IntPtr.Zero; 673IntPtr pIStream = IntPtr.Zero; 679return IntPtr.Zero; 686return IntPtr.Zero; 698IntPtr pStream = IntPtr.Zero;
System\Windows\Media\textformatting\TextFormatterContext.cs (14)
59_ploc = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 66if(_ploc.Value == System.IntPtr.Zero) 79contextInfo.pols = IntPtr.Zero; // This will be filled in the un-managed code 137IntPtr ploc = IntPtr.Zero; 138IntPtr ppenaltyModule = IntPtr.Zero; 192Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 268if(_ploc.Value != System.IntPtr.Zero) 271_ploc.Value = IntPtr.Zero; 283Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 313Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 339Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 361Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 380Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 400Invariant.Assert(_ploc.Value != System.IntPtr.Zero);
System\Windows\Media\textformatting\TextLineBreak.cs (5)
52if (breakRecord.Value == IntPtr.Zero) 87IntPtr pbreakrec = IntPtr.Zero; 89if (_breakRecord.Value != IntPtr.Zero) 110if (_breakRecord.Value != IntPtr.Zero) 114_breakRecord.Value = IntPtr.Zero;
System\Windows\Media\textformatting\TextParagraphCache.cs (5)
66TextFormatterContext context = settings.Formatter.AcquireContext(_fullText, IntPtr.Zero); 70IntPtr ploparabreakValue = IntPtr.Zero; 77IntPtr.Zero, 166if(_ploparabreak.Value != IntPtr.Zero) 170_ploparabreak.Value = IntPtr.Zero;
System\Windows\Media\UnsafeNativeMethodsMilCoreApi.cs (2)
531if (ptr != IntPtr.Zero) 535ptr = IntPtr.Zero;
System\Windows\UIElement.cs (2)
1144HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 1152if (dc == IntPtr.Zero)
PresentationFramework (710)
Microsoft\Win32\CommonDialog.cs (8)
85if (hwndOwner == IntPtr.Zero) 101if (hwndOwner == IntPtr.Zero) 103tempParentHwnd = new HwndWrapper(0, 0, 0, 0, 0, 0, 0, "", IntPtr.Zero, null); 161if (hwndOwner == IntPtr.Zero) 247return IntPtr.Zero; 286IntPtr hMonitor = IntPtr.Zero; 289if (_hwndOwnerWindow != IntPtr.Zero) 303if (hMonitor != IntPtr.Zero)
MS\Internal\AppModel\AppSecurityManager.cs (1)
111UnsafeNativeMethods.ShellExecute(new HandleRef(null, IntPtr.Zero), /*hwnd*/
MS\Internal\AppModel\IconHelper.cs (3)
224IntPtr bits = IntPtr.Zero; 226new HandleRef(null, IntPtr.Zero), // A device context. Pass null in if no DIB_PAL_COLORS is used. 234if (colorBitmap.IsInvalid || bits == IntPtr.Zero)
MS\Internal\AppModel\SecurityMgrSite.cs (1)
28phwnd = IntPtr.Zero;
MS\Internal\AppModel\ShellProvider.cs (1)
951HRESULT hr = NativeMethods2.SHGetFolderPathEx(ref knownFolder, 0, IntPtr.Zero, pathBuilder, (uint)pathBuilder.Capacity);
MS\Internal\Controls\ActiveXHelper.cs (2)
91if (hDC != IntPtr.Zero) 110if (hDC != IntPtr.Zero)
MS\Internal\Controls\ActiveXSite.cs (2)
182if (hwnd != IntPtr.Zero) 270lpFrameInfo.hAccel = IntPtr.Zero;
MS\Internal\Controls\EnumUnknown.cs (2)
45if (pceltFetched != IntPtr.Zero) 71if (pceltFetched != IntPtr.Zero)
MS\Internal\Documents\DocumentViewerHelper.cs (1)
286IntPtr hwnd = (hwndSource != null) ? hwndSource.CriticalHandle : IntPtr.Zero;
MS\Internal\IO\Packaging\indexingfiltermarshaler.cs (5)
184IntPtr pszVal = IntPtr.Zero; 185IntPtr pNative = IntPtr.Zero; 217Invariant.Assert(pNative != IntPtr.Zero); 224if (pszVal != IntPtr.Zero) 229if (pNative != IntPtr.Zero)
MS\Internal\IO\Packaging\ManagedIStream.cs (3)
49if (bytesReadPtr != IntPtr.Zero) 88if (newPositionPtr != IntPtr.Zero) 149if (bytesWrittenPtr != IntPtr.Zero)
MS\Internal\IO\Packaging\XpsFilter.cs (1)
116if (pBuffer == IntPtr.Zero)
MS\Internal\Printing\NativeMethods.cs (18)
32public IntPtr hwndOwner = IntPtr.Zero; 33public IntPtr hDevMode = IntPtr.Zero; 34public IntPtr hDevNames = IntPtr.Zero; 35public IntPtr hDC = IntPtr.Zero; 41public IntPtr lpPageRanges = IntPtr.Zero; 45public IntPtr hInstance = IntPtr.Zero; 46public IntPtr lpPrintTemplateName = IntPtr.Zero; 47public IntPtr lpCallback = IntPtr.Zero; 49public IntPtr lphPropertyPages = IntPtr.Zero; 58public IntPtr hwndOwner = IntPtr.Zero; 59public IntPtr hDevMode = IntPtr.Zero; 60public IntPtr hDevNames = IntPtr.Zero; 61public IntPtr hDC = IntPtr.Zero; 67public IntPtr lpPageRanges = IntPtr.Zero; 71public IntPtr hInstance = IntPtr.Zero; 72public IntPtr lpPrintTemplateName = IntPtr.Zero; 73public IntPtr lpCallback = IntPtr.Zero; 75public IntPtr lphPropertyPages = IntPtr.Zero;
MS\Internal\Printing\PrintDlgExMarshaler.cs (28)
48_unmanagedPrintDlgEx = IntPtr.Zero; 90if (_unmanagedPrintDlgEx == IntPtr.Zero) 153if (_unmanagedPrintDlgEx != IntPtr.Zero) 161if (_ownerHandle == IntPtr.Zero) 190if (_unmanagedPrintDlgEx != IntPtr.Zero) 193_unmanagedPrintDlgEx = IntPtr.Zero; 230IntPtr devNamesHandle = IntPtr.Zero; 231IntPtr pageRangePtr = IntPtr.Zero; 258(pageRangePtr != IntPtr.Zero)) 272if (devNamesHandle != IntPtr.Zero) 274IntPtr pDevNames = IntPtr.Zero; 285if (pDevNames != IntPtr.Zero) 370IntPtr pDevMode = IntPtr.Zero; 381if (pDevMode != IntPtr.Zero) 447IntPtr unmanagedBuffer = IntPtr.Zero; 510pdex.lpPageRanges = IntPtr.Zero; 587pdex.lpPageRanges = IntPtr.Zero; 617if (unmanagedBuffer != IntPtr.Zero) 620unmanagedBuffer = IntPtr.Zero; 643if (unmanagedBuffer == IntPtr.Zero) 648IntPtr devModeHandle = IntPtr.Zero; 649IntPtr devNamesHandle = IntPtr.Zero; 650IntPtr pageRangePtr = IntPtr.Zero; 670if (devModeHandle != IntPtr.Zero) 675if (devNamesHandle != IntPtr.Zero) 680if (pageRangePtr != IntPtr.Zero) 696IntPtr temp = IntPtr.Zero; 717IntPtr hDevNames = IntPtr.Zero;
MS\Internal\Printing\Win32PrintDialog.cs (2)
60IntPtr owner = IntPtr.Zero; 121if (owner == IntPtr.Zero)
MS\Internal\PtsHost\BaseParaClient.cs (2)
47_paraHandle = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 73Debug.Assert(_paraHandle.Value == IntPtr.Zero || _paraHandle.Value == pfspara);
MS\Internal\PtsHost\CellParaClient.cs (10)
123if(_paraHandle.Value != IntPtr.Zero) 160if(CellParagraph.StructuralCache.DtrList != null && breakRecordIn != IntPtr.Zero) 179bool suppressTopSpace = (breakRecordIn != IntPtr.Zero) ? true : false; 183IntPtr.Zero, 200if (pmcsclientOut != IntPtr.Zero) 206pmcsclientOut = IntPtr.Zero; 250if (pmcsclientOut != IntPtr.Zero) 256pmcsclientOut = IntPtr.Zero; 297if (pmcsclientOut != IntPtr.Zero) 303pmcsclientOut = IntPtr.Zero;
MS\Internal\PtsHost\CellParagraph.cs (4)
99ppfscell = IntPtr.Zero; 108if (pfsbrkcellOut != IntPtr.Zero) 111pfsbrkcellOut = IntPtr.Zero; 114ppfscell = IntPtr.Zero;
MS\Internal\PtsHost\ContainerParagraph.cs (23)
178firstParaName = (_firstChild != null) ? _firstChild.Handle : IntPtr.Zero; 274nextParaName = IntPtr.Zero; 333nmpBeforeChange = IntPtr.Zero; 498if (mcs != null && pbrkrecIn != IntPtr.Zero) 531if (pbrkrecIn == IntPtr.Zero) 552(mcsContainer != null) ? mcsContainer.Handle : IntPtr.Zero, fskclearIn, 584if (pmcsclientOut != IntPtr.Zero) 588pmcsclientOut = IntPtr.Zero; 599pmcsclientOut = (mcsNew != null) ? mcsNew.Handle : IntPtr.Zero; 625paraClient.SetChunkInfo(pbrkrecIn == IntPtr.Zero, pbrkrecOut == IntPtr.Zero); 695(mcsContainer != null) ? mcsContainer.Handle : IntPtr.Zero, fskclearIn, fInterruptable, 714if (pmcsclientOut != IntPtr.Zero) 718pmcsclientOut = IntPtr.Zero; 723pmcsclientOut = (mcsNew != null) ? mcsNew.Handle : IntPtr.Zero; 739Debug.Assert(pmcsclientOut == IntPtr.Zero); 740pfspara = IntPtr.Zero; 825(mcsContainer != null) ? mcsContainer.Handle : IntPtr.Zero, fskclearIn, fInterruptable, 844if (pmcsclientOut != IntPtr.Zero) 848pmcsclientOut = IntPtr.Zero; 853pmcsclientOut = (mcsNew != null) ? mcsNew.Handle : IntPtr.Zero; 869Debug.Assert(pmcsclientOut == IntPtr.Zero); 870pfspara = IntPtr.Zero;
MS\Internal\PtsHost\FigureParaClient.cs (2)
47if (SubpageHandle != IntPtr.Zero) 50SubpageHandle = 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;
MS\Internal\PtsHost\FloaterParagraph.cs (27)
203pbrkrecOut = IntPtr.Zero; 204pfsFloatContent = IntPtr.Zero; 256Debug.Assert(pmcsclientOut == IntPtr.Zero); 275if (pfsFloatContent != IntPtr.Zero) 278pfsFloatContent = IntPtr.Zero; 280if (pbrkrecOut != IntPtr.Zero) 283pbrkrecOut = IntPtr.Zero; 285if (pmcsclientOut != IntPtr.Zero) 290pmcsclientOut = IntPtr.Zero; 310if (pmcsclientOut != IntPtr.Zero) 315pmcsclientOut = IntPtr.Zero; 343if (pfsFloatContent != IntPtr.Zero) 346pfsFloatContent = IntPtr.Zero; 348if (pbrkrecOut != IntPtr.Zero) 351pbrkrecOut = IntPtr.Zero; 409pfsFloatContent = IntPtr.Zero; 451if (pfsFloatContent != IntPtr.Zero) 455if (pmcsclientOut != IntPtr.Zero) 460pmcsclientOut = IntPtr.Zero; 478if (pmcsclientOut != IntPtr.Zero) 483pmcsclientOut = IntPtr.Zero; 499if (pfsFloatContent != IntPtr.Zero) 504Debug.Assert(pmcsclientOut == IntPtr.Zero); 506pfsFloatContent = IntPtr.Zero; 523Debug.Assert(pmcsclientOut == IntPtr.Zero); 526pfsFloatContent = IntPtr.Zero; 574pmcsclientOut = IntPtr.Zero;
MS\Internal\PtsHost\FlowDocumentPage.cs (2)
431if (_ptsPage.PageHandle == IntPtr.Zero) 500if (columnDesc.pfstrack != IntPtr.Zero)
MS\Internal\PtsHost\PageBreakRecord.cs (2)
39Invariant.Assert(br.Value != IntPtr.Zero, "Invalid break record object."); 154_br.Value = IntPtr.Zero;
MS\Internal\PtsHost\PtsCache.cs (8)
331Invariant.Assert(_contextPool[index].PtsHost.Context != IntPtr.Zero, "PTS Context handle is not valid."); 333Invariant.Assert(_contextPool[index].InstalledObjects != IntPtr.Zero, "Installed Objects handle is not valid."); 406Invariant.Assert(_contextPool[index].PtsHost.Context != IntPtr.Zero, "PTS Context handle is not valid."); 408Invariant.Assert(_contextPool[index].InstalledObjects != IntPtr.Zero, "Installed Objects handle is not valid."); 625subtrackParaInfo.pfnGetFootnoteInfoWord = IntPtr.Zero; 688tableobjInit.tableobjcbk.pfnGetDvrUsedForFloatTable = IntPtr.Zero; 718tableobjInit.tablecbkcell.pfnGetCellFootnoteInfo = IntPtr.Zero; 719tableobjInit.tablecbkcell.pfnGetCellFootnoteInfoWord = IntPtr.Zero;
MS\Internal\PtsHost\PtsContext.cs (8)
88Invariant.Assert(((IntPtr)_pageBreakRecords[index]) != IntPtr.Zero, "Invalid break record object"); 106Invariant.Assert(((IntPtr)_pages[index]) != IntPtr.Zero, "Invalid break record object"); 287Invariant.Assert(ptsPage.Value != IntPtr.Zero, "Invalid page object."); 302Invariant.Assert(ptsPage.Value != IntPtr.Zero, "Invalid page object."); 328Invariant.Assert(br.Value != IntPtr.Zero, "Invalid break record object."); 342Invariant.Assert(br.Value != IntPtr.Zero, "Invalid break record object."); 477Invariant.Assert(ptsPage.Value != IntPtr.Zero, "Invalid page object."); 514Invariant.Assert(br.Value != IntPtr.Zero, "Invalid break record object.");
MS\Internal\PtsHost\PtsHelper.cs (5)
129if (trackDesc.pfstrack != IntPtr.Zero) 219bool emptyTrack = (trackDesc.pfstrack == IntPtr.Zero); 322if (trackDesc.pfstrack != IntPtr.Zero) 379if (trackDesc.pfstrack == IntPtr.Zero) { return null; } 454if (trackDesc.pfstrack == IntPtr.Zero)
MS\Internal\PtsHost\PtsHost.cs (97)
51_context = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 78get { Invariant.Assert(_context.Value != IntPtr.Zero); return _context.Value; } 79set { Invariant.Assert(_context.Value == IntPtr.Zero); _context.Value = value; } 342fSuccess = 0; nmsNext = IntPtr.Zero; 348fSuccess = 0; nmsNext = IntPtr.Zero; 437nmSegment = IntPtr.Zero; 443nmSegment = IntPtr.Zero; 472fHeaderPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirHeader = 0; nmsHeader = IntPtr.Zero; 478fHeaderPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirHeader = 0; nmsHeader = IntPtr.Zero; 507fFooterPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirFooter = 0; nmsFooter = IntPtr.Zero; 513fFooterPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirFooter = 0; nmsFooter = IntPtr.Zero; 616fSuccessful = 0; nmp = IntPtr.Zero; 622fSuccessful = 0; nmp = IntPtr.Zero; 646fFound = 0; nmpNext = IntPtr.Zero; 652fFound = 0; nmpNext = IntPtr.Zero; 674fFound = fChangeFirst = 0; nmpBeforeChange = IntPtr.Zero; 680fFound = fChangeFirst = 0; nmpBeforeChange = IntPtr.Zero; 753pfsparaclient = IntPtr.Zero; 759pfsparaclient = IntPtr.Zero; 840nmsEndnoteSeparator = nmsEndnoteContSeparator = nmsEndnoteContNotice = IntPtr.Zero; 846nmsEndnoteSeparator = nmsEndnoteContSeparator = nmsEndnoteContNotice = IntPtr.Zero; 867fEndnotesPresent = 0; nmsEndnotes = IntPtr.Zero; 873fEndnotesPresent = 0; nmsEndnotes = IntPtr.Zero; 908nmsFtnSeparator = nmsFtnContSeparator = nmsFtnContNotice = IntPtr.Zero; 947nmsFootnote = IntPtr.Zero; 990pmcsclientNew = IntPtr.Zero; 996pmcsclientNew = IntPtr.Zero; 1032if (pmcsclient1 == IntPtr.Zero || pmcsclient2 == IntPtr.Zero) 1078if (pmcsclient != IntPtr.Zero) 1117pObjectInfo = IntPtr.Zero; 1159if(pfsbreakreclineclient != IntPtr.Zero) 1175ppfsparabreakingsession = IntPtr.Zero; 1183ppfsparabreakingsession = IntPtr.Zero; 1287pfsdropc = IntPtr.Zero; 1339pmcsclientOut = IntPtr.Zero; 1344pmcsclientOut = IntPtr.Zero; 1350pmcsclientOut = IntPtr.Zero; 1402pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1409pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1461pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = 0; 1468pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = 0; 1504if(pbrlineIn != IntPtr.Zero) 1560rgfslinevariant[breakIndex].pfsbreakreclineclient = IntPtr.Zero; 1645pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1652pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1682pbrlineDup = IntPtr.Zero; 1688pbrlineDup = IntPtr.Zero; 1888pmcsclientAfterPara = IntPtr.Zero; 2275fsfmtr = new PTS.FSFMTR(); pfsFloatContent = pbrkrecpara = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2281fsfmtr = new PTS.FSFMTR(); pfsFloatContent = pbrkrecpara = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2318pfsFloatContent = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2325pfsFloatContent = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2606if (pmcsclientIn != IntPtr.Zero) 2615pmcsclientOut = IntPtr.Zero; 2621pmcsclientOut = IntPtr.Zero; 2642if (pmcsclientIn != IntPtr.Zero) 2723if (pmcsclientIn != IntPtr.Zero) 2734fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 2741fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 2780if (pmcsclientIn != IntPtr.Zero) 2791pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2799pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2837if (pmcsclientIn != IntPtr.Zero) 2849pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2857pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3038if (pmcsclientIn != IntPtr.Zero) 3049fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 3056fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 3094if (pmcsclientIn != IntPtr.Zero) 3106pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3114pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3152if (pmcsclientIn != IntPtr.Zero) 3164pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3172pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3391ppmcsclientOut = IntPtr.Zero; 3397ppmcsclientOut = IntPtr.Zero; 3421pnmFirstHeaderRow = IntPtr.Zero; 3428pnmFirstHeaderRow = IntPtr.Zero; 3453pnmNextHeaderRow = IntPtr.Zero; 3460pnmNextHeaderRow = IntPtr.Zero; 3484pnmFirstFooterRow = IntPtr.Zero; 3491pnmFirstFooterRow = IntPtr.Zero; 3516pnmNextFooterRow = IntPtr.Zero; 3523pnmNextFooterRow = IntPtr.Zero; 3546pnmFirstRow = IntPtr.Zero; 3553pnmFirstRow = IntPtr.Zero; 3577pnmNextRow = IntPtr.Zero; 3584pnmNextRow = IntPtr.Zero; 3652pnmRowBeforeChange = IntPtr.Zero; 3660pnmRowBeforeChange = IntPtr.Zero; 3916ppfscell = IntPtr.Zero; 3917pfsbrkcellOut = IntPtr.Zero; 3925ppfscell = IntPtr.Zero; 3926pfsbrkcellOut = IntPtr.Zero; 3961ppfscell = IntPtr.Zero; 3969ppfscell = IntPtr.Zero;
MS\Internal\PtsHost\PtsPage.cs (12)
55_ptsPage = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 306_ptsPage.Value = IntPtr.Zero; 398IntPtr brIn = (breakRecord != null) ? breakRecord.BreakRecord : IntPtr.Zero; 408_ptsPage.Value = IntPtr.Zero; 409brOut = IntPtr.Zero; 416if (brOut != IntPtr.Zero) 459IntPtr brIn = (breakRecord != null) ? breakRecord.BreakRecord : IntPtr.Zero; 475if (brOut != IntPtr.Zero) 728_ptsPage.Value = IntPtr.Zero; 1443if (_ptsPage.Value != IntPtr.Zero) 1446_ptsPage.Value = IntPtr.Zero; 1464return (_ptsPage.Value == IntPtr.Zero);
MS\Internal\PtsHost\RowParagraph.cs (2)
88paraClientHandle = IntPtr.Zero; 203if(rgpfsCell[index] != IntPtr.Zero)
MS\Internal\PtsHost\Section.cs (7)
179nmsNext = IntPtr.Zero; 289nmsHeader = IntPtr.Zero; 333nmsFooter = IntPtr.Zero; 383nmsEndnotes = IntPtr.Zero; 403nmsEndnoteSeparator = IntPtr.Zero; 404nmsEndnoteContSeparator = IntPtr.Zero; 405nmsEndnoteContNotice = IntPtr.Zero;
MS\Internal\PtsHost\SubpageParaClient.cs (2)
52if (_paraHandle.Value != IntPtr.Zero) 55_paraHandle.Value = IntPtr.Zero;
MS\Internal\PtsHost\SubpageParagraph.cs (19)
153if (mcs != null && pbrkrecIn != IntPtr.Zero) 183if (pbrkrecIn == IntPtr.Zero) 249if (pbrkrecIn == IntPtr.Zero) // if first chunk 256if (pmcsclientOut != IntPtr.Zero) 260pmcsclientOut = IntPtr.Zero; 280pmcsclientOut = (mcsBottom != null) ? mcsBottom.Handle : IntPtr.Zero; 282if (pmcsclientOut == IntPtr.Zero) // if last chunk 310paraClient.SetChunkInfo(pbrkrecIn == IntPtr.Zero, pbrkrecOut == IntPtr.Zero); 420if (pmcsclientOut != IntPtr.Zero) 424pmcsclientOut = IntPtr.Zero; 427pmcsclientOut = (mcsBottom != null) ? mcsBottom.Handle : IntPtr.Zero; 457Debug.Assert(pmcsclientOut == IntPtr.Zero); 458pfspara = IntPtr.Zero; 579if (pmcsclientOut != IntPtr.Zero) 583pmcsclientOut = IntPtr.Zero; 586pmcsclientOut = (mcsBottom != null) ? mcsBottom.Handle : IntPtr.Zero; 616Debug.Assert(pmcsclientOut == IntPtr.Zero); 617pfspara = IntPtr.Zero;
MS\Internal\PtsHost\TableParaClient.cs (13)
133if (arrayFsCell[iC] == IntPtr.Zero) 347if (arrayFsCell[iC] == IntPtr.Zero) 395if (arrayFsCell[iC] == IntPtr.Zero) 469if (arrayFsCell[iC] == IntPtr.Zero) 560if (arrayFsCell[iC] == IntPtr.Zero) 636if (arrayFsCell[iC] == IntPtr.Zero) 757if(arrayFsCell[iC] != IntPtr.Zero && 853if (arrayFsCell[iC] == IntPtr.Zero) 920if (arrayFsCell[iC] == IntPtr.Zero) 980if (arrayFsCell[iC] == IntPtr.Zero) 1059if (arrayFsCell[iC] == IntPtr.Zero) 1558arrayFsCell[iC] == IntPtr.Zero 1676if (arrayFsCell[iC] == IntPtr.Zero)
MS\Internal\PtsHost\TableParagraph.cs (9)
185ppmcsclientOut = IntPtr.Zero; 189if (pmcsclientIn != IntPtr.Zero) 211pnmFirstHeaderRow = IntPtr.Zero; 228pnmNextHeaderRow = IntPtr.Zero; 243pnmFirstFooterRow = IntPtr.Zero; 260pnmNextFooterRow = IntPtr.Zero; 301pnmFirstRow = IntPtr.Zero; 376pnmNextRow = IntPtr.Zero; 413pnmRowBeforeChange = IntPtr.Zero;
MS\Internal\PtsHost\TextParaClient.cs (2)
529IntPtr breakRecLine = IntPtr.Zero; 988IntPtr breakRecLine = IntPtr.Zero;
MS\Internal\PtsHost\TextParagraph.cs (4)
272mcsClient = IntPtr.Zero; 567ppbrlineOut = IntPtr.Zero; 751ppbrlineOut = IntPtr.Zero; 1342if(pbrLineIn != IntPtr.Zero)
MS\Internal\PtsHost\UIElementParagraph.cs (6)
201pbrkrecOut = IntPtr.Zero; 202pfsFloatContent = IntPtr.Zero; 237pfsFloatContent = IntPtr.Zero; 255pbrkrecOut = IntPtr.Zero; 291pfsFloatContent = IntPtr.Zero; 369pmcsclientOut = IntPtr.Zero;
MS\Internal\PtsHost\UnmanagedHandle.cs (1)
46_handle = IntPtr.Zero;
MS\Internal\WindowsRuntime\Generated\Windows.Data.Text.cs (19)
47if (thisPtr == IntPtr.Zero) return null; 57public static bool operator ==(AlternateWordForm x, AlternateWordForm y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 80ppv = IntPtr.Zero; 265if (thisPtr == IntPtr.Zero) return null; 275public static bool operator ==(WordSegment x, WordSegment y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 298ppv = IntPtr.Zero; 370if (thisPtr == IntPtr.Zero) return null; 380public static bool operator ==(WordsSegmenter x, WordsSegmenter y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 405ppv = IntPtr.Zero; 431public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 433public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateWordForm obj) => obj is null ? IntPtr.Zero : CreateMarshaler(obj).GetRef(); 1555public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 1557public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegment obj) => obj is null ? IntPtr.Zero : CreateMarshaler(obj).GetRef(); 1633public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegmentsTokenizingHandler managedDelegate) => CreateMarshaler(managedDelegate)?.GetRef() ?? IntPtr.Zero; 1664public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 1666public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordsSegmenter obj) => obj is null ? IntPtr.Zero : CreateMarshaler(obj).GetRef();
MS\Internal\WindowsRuntime\Generated\Windows.Globalization.cs (6)
142if (thisPtr == IntPtr.Zero) return null; 152public static bool operator ==(Language x, Language y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 185ppv = IntPtr.Zero; 844public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 846public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Globalization.Language obj) => obj is null ? IntPtr.Zero : CreateMarshaler(obj).GetRef();
MS\Internal\WindowsRuntime\Generated\WinRT.cs (6)
59if (functionPtr == IntPtr.Zero) 138_moduleHandle = Platform.LoadLibraryExW(System.IO.Path.Combine(_currentModuleDirectory, fileName), IntPtr.Zero, /* LOAD_WITH_ALTERED_SEARCH_PATH */ 8); 140if (_moduleHandle == IntPtr.Zero) 150if (_moduleHandle == IntPtr.Zero) 158if (canUnloadNow != IntPtr.Zero) 179if ((_moduleHandle != IntPtr.Zero) && !Platform.FreeLibrary(_moduleHandle))
MS\Internal\WindowsRuntime\Generated\WinRT\ExceptionHelpers.cs (7)
44IntPtr winRTErrorModule = Platform.LoadLibraryExW("api-ms-win-core-winrt-error-l1-1-1.dll", IntPtr.Zero, (uint)DllImportSearchPath.System32); 45if (winRTErrorModule != IntPtr.Zero) 54winRTErrorModule = Platform.LoadLibraryExW("api-ms-win-core-winrt-error-l1-1-0.dll", IntPtr.Zero, (uint)DllImportSearchPath.System32); 55if (winRTErrorModule != IntPtr.Zero) 99if (restrictedErrorInfoPtr != IntPtr.Zero) 190hstring = IntPtr.Zero; 314if (restrictedErrorInfoPtr != IntPtr.Zero)
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\ExceptionErrorInfo.cs (16)
141source = IntPtr.Zero; 159description = IntPtr.Zero; 177helpFile = IntPtr.Zero; 195helpFileContent = IntPtr.Zero; 239return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 253return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 267return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 281return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 317IntPtr __return_value__ = IntPtr.Zero; 426IntPtr _description = IntPtr.Zero; 427IntPtr _restrictedDescription = IntPtr.Zero; 428IntPtr _capabilitySid = IntPtr.Zero; 432description = _description != IntPtr.Zero ? Marshal.PtrToStringBSTR(_description) : string.Empty; 433restrictedDescription = _restrictedDescription != IntPtr.Zero ? Marshal.PtrToStringBSTR(_restrictedDescription) : string.Empty; 434capabilitySid = _capabilitySid != IntPtr.Zero ? Marshal.PtrToStringBSTR(_capabilitySid) : string.Empty; 450return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty;
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\IContextCallback.cs (1)
79Marshal.ThrowExceptionForHR(_obj.Vftbl.ContextCallback_4(ThisPtr, pfnCallback, pParam, ref riid, iMethod, IntPtr.Zero));
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (31)
74public static IntPtr GetAbi(MarshalString m) => m is null ? IntPtr.Zero : m._handle; 76public static IntPtr GetAbi(object box) => box is null ? IntPtr.Zero : ((MarshalString)box)._handle; 88if (hstring != IntPtr.Zero) 100if (value == IntPtr.Zero) 111return IntPtr.Zero; 130if (_array != IntPtr.Zero) 204return (0, IntPtr.Zero); 206IntPtr data = IntPtr.Zero; 212data = IntPtr.Zero; 313return (0, IntPtr.Zero); 448if (_array != IntPtr.Zero) 517if (abi.data == IntPtr.Zero) 535return (0, IntPtr.Zero); 537IntPtr data = IntPtr.Zero; 543data = IntPtr.Zero; 611if (abi.data == IntPtr.Zero) return; 630if (_array != IntPtr.Zero) 695return (0, IntPtr.Zero); 697IntPtr data = IntPtr.Zero; 703data = IntPtr.Zero; 765if (abi.data == IntPtr.Zero) return; 772return objRef?.ThisPtr ?? IntPtr.Zero; 782if (ptr == IntPtr.Zero) return; 797if (ptr == IntPtr.Zero) 846value is null ? IntPtr.Zero : MarshalInterfaceHelper<T>.GetAbi(value); 856return IntPtr.Zero; 864(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 929objRef is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(objRef); 933if (ptr == IntPtr.Zero) 964return objRef?.GetRef() ?? IntPtr.Zero; 970*(IntPtr*)dest.ToPointer() = objRef?.GetRef() ?? IntPtr.Zero;
MS\Internal\WindowsRuntime\Generated\WinRT\ObjectReference.cs (5)
44if (thisPtr == IntPtr.Zero) 160if (thisPtr == IntPtr.Zero) 165thisPtr = IntPtr.Zero; 188if (thisPtr == IntPtr.Zero) 199if (thisPtr == IntPtr.Zero)
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IEnumerable.cs (8)
47objRef?.ThisPtr ?? IntPtr.Zero; 50thisPtr == IntPtr.Zero ? null : new IEnumerable<T>(ObjRefFromAbi(thisPtr)); 53(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 149if (thisPtr == IntPtr.Zero) 203objRef?.ThisPtr ?? IntPtr.Zero; 206thisPtr == IntPtr.Zero ? null : new IEnumerator<T>(ObjRefFromAbi(thisPtr)); 212(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 553if (thisPtr == IntPtr.Zero)
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (4)
42objRef?.ThisPtr ?? IntPtr.Zero; 45thisPtr == IntPtr.Zero ? null : new IReadOnlyList<T>(ObjRefFromAbi(thisPtr)); 48(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 346if (thisPtr == IntPtr.Zero)
System\Windows\Appearance\WindowBackdropManager.cs (5)
37if (handle == IntPtr.Zero) 49if (hwnd == IntPtr.Zero) 92if (hwnd != IntPtr.Zero) 107if (hwnd != IntPtr.Zero) 110if (windowSource?.Handle != IntPtr.Zero && windowSource.CompositionTarget != null)
System\Windows\Application.cs (5)
1919return IntPtr.Zero; 2063IntPtr.Zero, 2070IntPtr retInt = IntPtr.Zero; 2126refInt = IntPtr.Zero; 2280UnsafeNativeMethods.PlaySound(soundFile, IntPtr.Zero, PLAYSOUND_FLAGS);
System\Windows\Automation\Peers\HwndHostAutomationPeer.cs (1)
44if(hwnd != IntPtr.Zero)
System\Windows\Automation\Peers\WindowAutomationPeer.cs (1)
83if(windowHandle != IntPtr.Zero) //it is Zero on a window that was just closed
System\Windows\Controls\ComboBox.cs (1)
1702if (comboBox.IsDropDownOpen && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero)
System\Windows\Controls\PopupControlService.cs (1)
108if (MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero)
System\Windows\Controls\Primitives\MenuBase.cs (2)
560if (menu.IsMenuMode && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero) 621HwndSource hwndSourceWithFocus = hwndWithFocus != IntPtr.Zero ? HwndSource.CriticalFromHwnd(hwndWithFocus) : null;
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\Controls\WebBrowser.cs (4)
287dp.rgvarg = IntPtr.Zero; 308dp.rgvarg = (args == null) ? IntPtr.Zero : UnsafeNativeMethods.ArrayToVARIANTHelper.ArrayToVARIANTVector(args); 310dp.rgdispidNamedArgs = IntPtr.Zero; 338if (dp.rgvarg != IntPtr.Zero)
System\windows\Documents\CaretElement.cs (2)
973IntPtr hwnd = IntPtr.Zero; 981if (hwnd != IntPtr.Zero)
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\Documents\MoveSizeWinEventHandler.cs (1)
74while (hwndTemp != IntPtr.Zero)
System\Windows\Documents\NaturalLanguageHyphenator.cs (2)
76if (!_disposed && _hyphenatorResource != IntPtr.Zero) 118if (_hyphenatorResource == IntPtr.Zero)
System\windows\Documents\TextEditorContextMenu.cs (1)
304IntPtr hwnd = IntPtr.Zero;
System\windows\Documents\TextEditorDragDrop.cs (2)
670IntPtr hwnd = IntPtr.Zero; 677if (hwnd != IntPtr.Zero)
System\windows\Documents\TextEditorTyping.cs (1)
1625IntPtr hwnd = IntPtr.Zero;
System\Windows\Documents\TextStore.cs (3)
1183hwnd = IntPtr.Zero; 2653IntPtr hwnd = IntPtr.Zero; 3316IntPtr hwnd = IntPtr.Zero;
System\Windows\Documents\WinEventHandler.cs (4)
91_hHook.Value = UnsafeNativeMethods.SetWinEventHook(_eventMin, _eventMax, IntPtr.Zero, _winEventProc.Value, 93if (_hHook.Value == IntPtr.Zero ) 103if (_hHook.Value != IntPtr.Zero ) 106_hHook.Value = IntPtr.Zero ;
System\Windows\Input\KeyboardNavigation.cs (1)
3293if (activeWindow != IntPtr.Zero)
System\Windows\Interop\ActiveXHost.cs (4)
161if (ControlHandle.Handle == IntPtr.Zero) 163IntPtr inplaceWindow = IntPtr.Zero; 517IntPtr.Zero, 538if (this.ParentHandle.Handle != IntPtr.Zero)
System\Windows\Interop\BrowserInteropHelper.cs (1)
218return IntPtr.Zero;
System\Windows\Interop\DynamicScriptObject.cs (1)
435if (dp.rgvarg != IntPtr.Zero)
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\Interop\WindowInteropHelper.cs (1)
114if (CriticalHandle == 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\MessageWindow.cs (7)
76IntPtr.Zero, 77IntPtr.Zero, 78IntPtr.Zero, 118_dispatcher.BeginInvoke(DispatcherPriority.Normal, (DispatcherOperationCallback)_DestroyWindowCallback, new object [] { IntPtr.Zero, className }); 120else if (Handle != IntPtr.Zero) 135Handle = IntPtr.Zero; 148IntPtr ret = IntPtr.Zero;
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\Standard\Utilities.cs (3)
230gdiObject = IntPtr.Zero; 231if (IntPtr.Zero != p) 241hwnd = IntPtr.Zero;
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\SystemParameters.cs (2)
5776HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 5784if (dc == IntPtr.Zero)
System\Windows\SystemResources.cs (3)
1127parent: IntPtr.Zero, 1440return IntPtr.Zero ; 1527return DpiUtil.GetProcessDpiAwarenessContextValue(IntPtr.Zero);
System\Windows\ThemeManager.cs (1)
142if (handle != 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);
PresentationFramework-SystemDrawing (3)
SystemDrawingExtension.cs (3)
46IntPtr hMetafile = IntPtr.Zero; 79return IntPtr.Zero; 94return (bitmap != null) ? bitmap.GetHbitmap() : IntPtr.Zero;
PresentationUI (5)
MS\Internal\Documents\Application\FileController.cs (1)
460IntPtr.Zero, originalUri, doc.DestinationToken.Location);
MS\Internal\Documents\PeoplePickerWrapper.cs (4)
177openQueryWindowParams.pPersistQuery = IntPtr.Zero; //We aren't persisting this query anywhere 178openQueryWindowParams.pFormParameters = IntPtr.Zero; //We aren't pre-populating the form 265if( hWndParent != IntPtr.Zero ) 324Invariant.Assert(_ptrToDsObjectNames != IntPtr.Zero, "Invalid pointer to DsObjectNames data.");
ReachFramework (23)
MS\Internal\Printing\Configuration\COMPSTUISRID.cs (1)
79this._compstuiHandle = UnsafeNativeMethods.LoadLibraryExW("compstui.dll", IntPtr.Zero, SafeLoadLibraryFlags);
MS\Internal\Printing\Configuration\DevMode.cs (1)
459if (devModeWPointer == IntPtr.Zero)
MS\Internal\Printing\Configuration\SafeWinSpoolPrinterHandle.cs (2)
19: base(IntPtr.Zero, true) 29return (base.handle == IntPtr.Zero);
MS\Internal\Printing\Configuration\WinSpoolPrinterCapabilities.cs (1)
68if (hdc != IntPtr.Zero)
PrintConfig\FallbackPTProvider.cs (7)
60if (false == UnsafeNativeMethods.OpenPrinterW(deviceName, out this._deviceHandle, new HandleRef(this, IntPtr.Zero))) 518result = UnsafeNativeMethods.DocumentPropertiesW(new HandleRef(this, IntPtr.Zero), this._deviceHandle, this._deviceName, outPtr, buffer, flags); 760if (pPrinterName != IntPtr.Zero) 767if (pPortName != IntPtr.Zero) 774if (pDriverName != IntPtr.Zero) 781if (pDevMode != IntPtr.Zero) 826if (pDevMode != IntPtr.Zero)
PrintConfig\PTProvider.cs (9)
54private SafePTProviderHandle() : base(IntPtr.Zero, true) 68return (IsClosed || (handle == IntPtr.Zero)); 432if (umDevMode != IntPtr.Zero) 435umDevMode = IntPtr.Zero; 468IntPtr umDevMode = IntPtr.Zero; 497if (umDevMode != IntPtr.Zero) 500umDevMode = IntPtr.Zero; 801uint hResult = UnsafeNativeMethods.CreateStreamOnHGlobal(SafeMemoryHandle.Wrap(IntPtr.Zero), true, out result); 821stream.Seek(0, 0 /*STREAM_SEEK_SET*/ , IntPtr.Zero);
PrintSystemExceptions\PrintSystemException.cs (2)
277IntPtr.Zero, 282IntPtr.Zero);
System.Diagnostics.Process (4)
Microsoft\Win32\SafeHandles\SafeProcessHandle.cs (1)
26: this(IntPtr.Zero)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.ParseMapModules.cs (1)
67EntryPointAddress = IntPtr.Zero // unknown
System\Diagnostics\Process.Linux.cs (1)
210minWorkingSet = IntPtr.Zero; // no defined limit available
System\Diagnostics\Process.Unix.cs (1)
1055public IntPtr MainWindowHandle => IntPtr.Zero;
System.Diagnostics.StackTrace (5)
System\Diagnostics\StackTraceSymbols.cs (5)
120if (loadedPeAddress == IntPtr.Zero && assemblyPath == null && inMemoryPdbAddress == IntPtr.Zero) 128provider = inMemoryPdbAddress != IntPtr.Zero ? 146Debug.Assert(inMemoryPdbAddress != IntPtr.Zero); 172if (loadedPeAddress != IntPtr.Zero && loadedPeSize > 0)
System.IO.Compression (2)
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (2)
19internal static readonly IntPtr ZNullPtr = IntPtr.Zero; 207SetHandle(IntPtr.Zero);
System.IO.Compression.Brotli (13)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBrotliHandle.cs (4)
11public SafeBrotliEncoderHandle() : base(IntPtr.Zero, true) { } 19public override bool IsInvalid => handle == IntPtr.Zero; 24public SafeBrotliDecoderHandle() : base(IntPtr.Zero, true) { } 32public override bool IsInvalid => handle == IntPtr.Zero;
System\IO\Compression\dec\BrotliDecoder.cs (3)
19_state = Interop.Brotli.BrotliDecoderCreateInstance(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
System\IO\Compression\enc\BrotliEncoder.cs (6)
27_state = Interop.Brotli.BrotliEncoderCreateInstance(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); 42_state = Interop.Brotli.BrotliEncoderCreateInstance(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
System.IO.MemoryMappedFiles (3)
System\IO\MemoryMappedFiles\MemoryMappedView.Unix.cs (3)
84IntPtr.Zero, // don't specify an address; let the system choose one 99IntPtr.Zero, 108if (addr == IntPtr.Zero) // note that shim uses null pointer, not non-null MAP_FAILED sentinel
System.Net.Http (2)
src\libraries\Common\src\System\Net\HttpKnownHeaderNames.TryGetHeaderName.cs (2)
37if (buffer == IntPtr.Zero) 368Debug.Assert(right != IntPtr.Zero);
System.Net.HttpListener (2)
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (2)
340ProtectedInvokeCallback(result, IntPtr.Zero); 346ProtectedInvokeCallback(null, IntPtr.Zero);
System.Net.Mail (5)
src\libraries\Common\src\System\Net\ContextAwareResult.cs (3)
324base.Complete(IntPtr.Zero); 355if (userToken != IntPtr.Zero || context == null) 367base.Complete(IntPtr.Zero);
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (2)
340ProtectedInvokeCallback(result, IntPtr.Zero); 346ProtectedInvokeCallback(null, IntPtr.Zero);
System.Net.Primitives (2)
System\Net\NetworkCredential.cs (2)
161IntPtr ptr = IntPtr.Zero; 170if (ptr != IntPtr.Zero)
System.Net.Quic (48)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.cs (1)
26if (ret == IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
102if (handle == IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Name.cs (2)
52base(IntPtr.Zero, ownsHandle: true) 64base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Stack.cs (4)
67base(IntPtr.Zero, ownsHandle: true) 74SetHandle(IntPtr.Zero); 80get { return handle == IntPtr.Zero; } 104base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509StoreCtx.cs (3)
75base(IntPtr.Zero, ownsHandle: true) 87SetHandle(IntPtr.Zero); 93get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (11)
12base(IntPtr.Zero, ownsHandle: true) 19SetHandle(IntPtr.Zero); 25get { return handle == IntPtr.Zero; } 32base(IntPtr.Zero, ownsHandle: true) 39SetHandle(IntPtr.Zero); 45get { return handle == IntPtr.Zero; } 52base(IntPtr.Zero, ownsHandle: true) 59SetHandle(IntPtr.Zero); 65get { return handle == IntPtr.Zero; } 72base(IntPtr.Zero, ownsHandle: true) 80base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (3)
16base(IntPtr.Zero, ownsHandle: true) 23SetHandle(IntPtr.Zero); 44return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (2)
28SetHandle(IntPtr.Zero); 38return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (9)
31base(IntPtr.Zero, ownsHandle: true) 38SetHandle(IntPtr.Zero); 44get { return handle == IntPtr.Zero; } 51base(IntPtr.Zero, ownsHandle: true) 58SetHandle(IntPtr.Zero); 64get { return handle == IntPtr.Zero; } 71base(IntPtr.Zero, ownsHandle: true) 78SetHandle(IntPtr.Zero); 84get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (6)
13base(IntPtr.Zero, ownsHandle: true) 20SetHandle(IntPtr.Zero); 26get { return handle == IntPtr.Zero; } 33base(IntPtr.Zero, ownsHandle: true) 40SetHandle(IntPtr.Zero); 46get { return handle == IntPtr.Zero; }
System\Net\Quic\Internal\MsQuicConfiguration.cs (3)
17=> certificate is X509Certificate2 certificate2 && certificate2.Handle != IntPtr.Zero && certificate2.HasPrivateKey; 221(void*)IntPtr.Zero, 273PrivateKeyPassword = (sbyte*)IntPtr.Zero
System\Net\Quic\Internal\MsQuicSafeHandle.cs (2)
28public override bool IsInvalid => handle == IntPtr.Zero; 62SetHandle(IntPtr.Zero);
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (1)
83if (certificatePtr != IntPtr.Zero)
System.Net.Requests (8)
src\libraries\Common\src\System\Net\ContextAwareResult.cs (3)
324base.Complete(IntPtr.Zero); 355if (userToken != IntPtr.Zero || context == null) 367base.Complete(IntPtr.Zero);
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (2)
340ProtectedInvokeCallback(result, IntPtr.Zero); 346ProtectedInvokeCallback(null, IntPtr.Zero);
System\Net\TimerThread.cs (3)
205if (_thisHandle == IntPtr.Zero) 245if (_thisHandle != IntPtr.Zero) 248_thisHandle = IntPtr.Zero;
System.Net.Security (90)
src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssBuffer.cs (5)
24if (_data == IntPtr.Zero || _length == 0) 43if (_data == IntPtr.Zero || _length == 0) 54internal unsafe ReadOnlySpan<byte> Span => (_data != IntPtr.Zero && _length != 0) ? 60if (_data != IntPtr.Zero) 63_data = IntPtr.Zero;
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.cs (1)
26if (ret == IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
102if (handle == IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OCSP.cs (2)
108handle = IntPtr.Zero; 123handle = IntPtr.Zero;
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (10)
188Interop.Ssl.SslCtxSetAlpnSelectCb(sslCtx, &AlpnServerSelectCallback, IntPtr.Zero); 340Debug.Assert(Interop.Ssl.SslGetData(sslHandle) == IntPtr.Zero); 653if (sslData == IntPtr.Zero) 708Debug.Assert(ssl != IntPtr.Zero); 709Debug.Assert(session != IntPtr.Zero); 712if (ptr != IntPtr.Zero) 733Debug.Assert(ctx != IntPtr.Zero && session != IntPtr.Zero); 736if (ptr == IntPtr.Zero) 750Debug.Assert(name != IntPtr.Zero);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (5)
412get { return handle == IntPtr.Zero; } 437Interop.Ssl.SslSetData(handle, IntPtr.Zero); 442SetHandle(IntPtr.Zero); 470public SafeSslHandle() : base(IntPtr.Zero, true) 474internal SafeSslHandle(IntPtr validSslPointer, bool ownsHandle) : base(IntPtr.Zero, ownsHandle)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtx.cs (10)
75: base(IntPtr.Zero, true) 86get { return handle == IntPtr.Zero; } 96Interop.Ssl.SslCtxSetData(handle, IntPtr.Zero); 113SetHandle(IntPtr.Zero); 131Debug.Assert(_sslSessions != null && session != IntPtr.Zero); 133if (_sslSessions == null || namePtr == IntPtr.Zero) 148IntPtr oldSession = IntPtr.Zero; 161if (oldSession != IntPtr.Zero) 188IntPtr oldSession = IntPtr.Zero; 219Debug.Assert(Interop.Ssl.SslGetData(sslHandle) == IntPtr.Zero);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Name.cs (2)
52base(IntPtr.Zero, ownsHandle: true) 64base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Stack.cs (4)
67base(IntPtr.Zero, ownsHandle: true) 74SetHandle(IntPtr.Zero); 80get { return handle == IntPtr.Zero; } 104base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509StoreCtx.cs (3)
75base(IntPtr.Zero, ownsHandle: true) 87SetHandle(IntPtr.Zero); 93get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (11)
12base(IntPtr.Zero, ownsHandle: true) 19SetHandle(IntPtr.Zero); 25get { return handle == IntPtr.Zero; } 32base(IntPtr.Zero, ownsHandle: true) 39SetHandle(IntPtr.Zero); 45get { return handle == IntPtr.Zero; } 52base(IntPtr.Zero, ownsHandle: true) 59SetHandle(IntPtr.Zero); 65get { return handle == IntPtr.Zero; } 72base(IntPtr.Zero, ownsHandle: true) 80base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\GssSafeHandles.cs (9)
52get { return handle == IntPtr.Zero; } 58SetHandle(IntPtr.Zero); 63: base(IntPtr.Zero, true) 134: base(IntPtr.Zero, true) 140get { return handle == IntPtr.Zero; } 146SetHandle(IntPtr.Zero); 159: base(IntPtr.Zero, true) 165get { return handle == IntPtr.Zero; } 171SetHandle(IntPtr.Zero);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (3)
16base(IntPtr.Zero, ownsHandle: true) 23SetHandle(IntPtr.Zero); 44return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (2)
28SetHandle(IntPtr.Zero); 38return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (9)
31base(IntPtr.Zero, ownsHandle: true) 38SetHandle(IntPtr.Zero); 44get { return handle == IntPtr.Zero; } 51base(IntPtr.Zero, ownsHandle: true) 58SetHandle(IntPtr.Zero); 64get { return handle == IntPtr.Zero; } 71base(IntPtr.Zero, ownsHandle: true) 78SetHandle(IntPtr.Zero); 84get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (6)
13base(IntPtr.Zero, ownsHandle: true) 20SetHandle(IntPtr.Zero); 26get { return handle == IntPtr.Zero; } 33base(IntPtr.Zero, ownsHandle: true) 40SetHandle(IntPtr.Zero); 46get { return handle == IntPtr.Zero; }
src\libraries\Common\src\System\Net\Security\Unix\SafeDeleteContext.cs (1)
26get { return (IntPtr.Zero == handle); }
System\Net\CertificateValidationPal.Unix.cs (3)
42if (remoteCertificate == IntPtr.Zero) 68if (certPtr != IntPtr.Zero) 86if (remoteCertificate != IntPtr.Zero)
System\Net\Security\Pal.Managed\SafeChannelBindingHandle.cs (2)
59public override bool IsInvalid => handle == IntPtr.Zero; 64SetHandle(IntPtr.Zero);
System\Net\Security\SslStream.Protocol.cs (1)
290if (certificate.Handle != IntPtr.Zero)
System.Net.Sockets (1)
System\Net\Sockets\SocketPal.Unix.cs (1)
609IntPtr fd = IntPtr.Zero;
System.Net.WebSockets (3)
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (2)
19internal static readonly IntPtr ZNullPtr = IntPtr.Zero; 207SetHandle(IntPtr.Zero);
System\Net\WebSockets\Compression\WebSocketDeflater.cs (1)
161_stream.NextIn = IntPtr.Zero;
System.Private.CoreLib (191)
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (4)
747IntPtr pReversePInvokePropagationCallback = IntPtr.Zero; 748IntPtr pReversePInvokePropagationContext = IntPtr.Zero; 821if (pCatchHandler == null && pReversePInvokePropagationCallback == IntPtr.Zero && !isExceptionIntercepted 838Debug.Assert(pCatchHandler != null || pReversePInvokePropagationCallback != IntPtr.Zero || unwoundReversePInvoke || isExceptionIntercepted, "We should have a handler if we're starting the second pass");
src\libraries\Common\src\Interop\Interop.ICU.cs (2)
17Debug.Assert(icuuc != IntPtr.Zero); 18Debug.Assert(icuin != IntPtr.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\ComponentActivator.cs (8)
79ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 118ArgumentOutOfRangeException.ThrowIfNotEqual(loadContext, IntPtr.Zero); 119ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 189ArgumentOutOfRangeException.ThrowIfNotEqual(loadContext, IntPtr.Zero); 190ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 257ArgumentOutOfRangeException.ThrowIfNotEqual(loadContext, IntPtr.Zero); 258ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 311if (delegateTypeNative == IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\IsolatedComponentLoadContext.cs (1)
54return IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\CriticalHandleZeroOrMinusOneIsInvalid.cs (2)
13: base(IntPtr.Zero) 17public override bool IsInvalid => handle == IntPtr.Zero || handle == new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeHandleZeroOrMinusOneIsInvalid.cs (2)
12protected SafeHandleZeroOrMinusOneIsInvalid(bool ownsHandle) : base(IntPtr.Zero, ownsHandle) 16public override bool IsInvalid => handle == IntPtr.Zero || handle == new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\System\ArgumentNullException.cs (1)
87if (argument == IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\ComAwareWeakReference.cs (1)
64Debug.Assert(pComWeakRef != IntPtr.Zero);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackFrameExtensions.cs (3)
13return stackFrame.GetNativeImageBase() != IntPtr.Zero; 35return IntPtr.Zero; 40return IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventProvider.cs (1)
110if (eventHandle != IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventProvider.cs (1)
1290return 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\NativeRuntimeEventSource.Threading.NativeSinks.cs (2)
261ThreadPoolIOEnqueue((IntPtr)registeredWaitHandle.GetHashCode(), IntPtr.Zero, registeredWaitHandle.Repeating); 300ThreadPoolIODequeue((IntPtr)registeredWaitHandle.GetHashCode(), IntPtr.Zero);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\NameInfo.cs (2)
77if ((eventHandle = eventHandleTable[descriptor.EventId]) == IntPtr.Zero) 81if ((eventHandle = eventHandleTable[descriptor.EventId]) == 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\Diagnostics\Tracing\TraceLogging\TraceLoggingEventSource.cs (3)
420Debug.Assert(eventHandle != IntPtr.Zero); 530Debug.Assert(eventHandle != IntPtr.Zero); 598Debug.Assert(eventHandle != 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);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.Nls.cs (3)
128Interop.Kernel32.EnumSystemLocalesEx(&EnumSystemLocalesProc, Interop.Kernel32.LOCALE_SPECIFICDATA | Interop.Kernel32.LOCALE_SUPPLEMENTAL, &context, IntPtr.Zero); 499Interop.Kernel32.EnumSystemLocalesEx(&EnumAllSystemLocalesProc, flags, &context, IntPtr.Zero); 527Interop.Kernel32.EnumSystemLocalesEx(&EnumAllSystemLocalesProc, Interop.Kernel32.LOCALE_REPLACEMENT, &context, IntPtr.Zero);
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (1)
179IntPtr byteOffset = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.Utf8.cs (2)
174IntPtr byteOffset = IntPtr.Zero; 484IntPtr byteOffset = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.Nls.cs (1)
28int ret = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _textInfoName,
src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerator.Unix.cs (7)
40if (_directoryHandle == IntPtr.Zero) 72if (handle == IntPtr.Zero) 77return IntPtr.Zero; 86IntPtr handle = Interlocked.Exchange(ref _directoryHandle, IntPtr.Zero); 87if (handle != IntPtr.Zero) 217_directoryHandle = IntPtr.Zero; 219while (_directoryHandle == IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\QCallHandles.cs (2)
76_assembly = assembly?.GetUnderlyingNativeHandle() ?? IntPtr.Zero; 89_handle = type?.GetUnderlyingNativeHandle() ?? IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.cs (1)
75IntPtr handle = Interlocked.Exchange(ref _handle, IntPtr.Zero);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (15)
564if (ptr == IntPtr.Zero) 608if (ptr == IntPtr.Zero) 646public static Exception? GetExceptionForHR(int errorCode) => GetExceptionForHR(errorCode, IntPtr.Zero); 924return IntPtr.Zero; 946return IntPtr.Zero; 969return IntPtr.Zero; 987return IntPtr.Zero; 1010return IntPtr.Zero; 1028return IntPtr.Zero; 1168if (s == IntPtr.Zero) 1183if (s == IntPtr.Zero) 1193if (s == IntPtr.Zero) 1203if (s == IntPtr.Zero) 1213if (s == IntPtr.Zero) 1225return IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.Unix.cs (2)
33private static bool IsNullOrWin32Atom(IntPtr ptr) => ptr == IntPtr.Zero; 86return IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (6)
158if (_typeUnion._unionTypes._unknown != IntPtr.Zero) 165if (_typeUnion._unionTypes._record._recordInfo != IntPtr.Zero) 168if (_typeUnion._unionTypes._record._record != IntPtr.Zero) 185if (_typeUnion._unionTypes._unknown != IntPtr.Zero) 193if (versionedStream != null && versionedStream->_stream != IntPtr.Zero) 493if (_typeUnion._unionTypes._bstr == IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.cs (8)
59return handle != IntPtr.Zero; 131return handle != IntPtr.Zero; 142if (handle == IntPtr.Zero) 178return address != IntPtr.Zero; 236return IntPtr.Zero; 241return IntPtr.Zero; 253IntPtr result = IntPtr.Zero; 261if (result == IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (3)
456return IntPtr.Zero; 815if (resolvedDll != IntPtr.Zero) 821return IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (6)
315IntPtr ptr = IntPtr.Zero; 326ptr = IntPtr.Zero; 332if (ptr != IntPtr.Zero) 353IntPtr ptr = IntPtr.Zero; 389ptr = IntPtr.Zero; 395if (ptr != IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\Threading\EventWaitHandle.Windows.cs (1)
29SafeWaitHandle handle = Interop.Kernel32.CreateEventEx(IntPtr.Zero, name, eventFlags, AccessRights);
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelMonitor.Unix.cs (3)
15if (_nativeMonitor == IntPtr.Zero) 23if (_nativeMonitor == IntPtr.Zero) 29_nativeMonitor = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Portable.cs (3)
110UserUnregisterWaitHandleValue = UserUnregisterWaitHandle?.DangerousGetHandle() ?? IntPtr.Zero; 140UserUnregisterWaitHandleValue = IntPtr.Zero; 170if (handleValue != IntPtr.Zero && handleValue != InvalidHandleValue)
src\libraries\System.Private.CoreLib\src\System\Threading\Semaphore.Windows.cs (1)
30SafeWaitHandle myHandle = Interop.Kernel32.CreateSemaphoreEx(IntPtr.Zero, initialCount, maximumCount, name, 0, AccessRights);
src\libraries\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolNativeOverlapped.cs (2)
53while ((freePtr = Volatile.Read(ref s_freeList)) != IntPtr.Zero) 60overlapped->_nextFree = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.FullGlobalizationData.cs (1)
65IntPtr regionPtr = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (2)
282if (dirHandle == IntPtr.Zero) 342if (dirHandle != IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\TypedReference.cs (2)
69if (_type == IntPtr.Zero) 80internal bool IsNull => Unsafe.IsNullRef(ref _value) && _type == IntPtr.Zero;
src\System\ComAwareWeakReference.CoreCLR.cs (1)
53return IntPtr.Zero;
src\System\Delegate.CoreCLR.cs (6)
106if (_methodPtrAux == IntPtr.Zero) 108if (d._methodPtrAux != IntPtr.Zero) 117if (d._methodPtrAux == IntPtr.Zero) 151if (_methodPtrAux == IntPtr.Zero) 169if (_methodPtrAux == IntPtr.Zero) 520return (_methodPtrAux == IntPtr.Zero) ? _target : null;
src\System\Diagnostics\StackFrame.CoreCLR.cs (1)
73if (method.Value == IntPtr.Zero)
src\System\Diagnostics\StackFrameHelper.cs (1)
166if (mh == IntPtr.Zero)
src\System\Reflection\LoaderAllocator.cs (1)
34if (m_nativeLoaderAllocator == IntPtr.Zero)
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (1)
413if (tls->ArgBuffer != IntPtr.Zero && *(int*)tls->ArgBuffer == 1 /* TAILCALLARGBUFFER_INSTARG_ONLY */)
src\System\Runtime\InteropServices\ComWrappers.cs (6)
46unknown = IntPtr.Zero; 67if (unknown == IntPtr.Zero) 201if (!TryGetOrCreateObjectForComInstanceInternal(this, externalComObject, IntPtr.Zero, flags, null, out obj)) 242return GetOrRegisterObjectForComInstance(externalComObject, flags, wrapper, IntPtr.Zero); 296if (innerMaybe != IntPtr.Zero && !flags.HasFlag(CreateObjectFlags.Aggregation)) 390ppObject = IntPtr.Zero;
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (2)
115IntPtr pNativeHome = IntPtr.Zero; 182IntPtr pNativeHome = IntPtr.Zero;
src\System\Runtime\Loader\AssemblyLoadContext.CoreCLR.cs (1)
162if (ptrAssemblyLoadContext == IntPtr.Zero)
src\System\RuntimeHandles.cs (6)
373else if (_handle.Value != IntPtr.Zero) 377return !(_handle.Value == IntPtr.Zero); 689return m_handle == IntPtr.Zero; 774public IntPtr Value => m_value != null ? m_value.Value.Value : IntPtr.Zero; 1042return m_handle == IntPtr.Zero; 1112public IntPtr Value => m_ptr != null ? m_ptr.Value.Value : IntPtr.Zero;
src\System\RuntimeType.CoreCLR.cs (6)
2425if (m_cache != IntPtr.Zero) 2440if (m_cache != IntPtr.Zero) 2456if (m_cache == IntPtr.Zero) 2460IntPtr gcHandle = Interlocked.CompareExchange(ref m_cache, newgcHandle, IntPtr.Zero); 2461if (gcHandle != IntPtr.Zero) 2481if (Volatile.Read(ref m_cache) == IntPtr.Zero)
src\System\StubHelpers.cs (23)
51return IntPtr.Zero; 118if (IntPtr.Zero == cstr) 196return IntPtr.Zero; 215if (pNative == IntPtr.Zero) 230return IntPtr.Zero; 246if (pNativeBuffer != IntPtr.Zero) 283if (IntPtr.Zero == bstr) 337return IntPtr.Zero; 374if (IntPtr.Zero == pNative) 384if (IntPtr.Zero != pNative) 397return IntPtr.Zero; 420if (IntPtr.Zero == bstr) 644if (nativeHome != IntPtr.Zero) 819if (*pNativeHome == IntPtr.Zero) 831if (*pNativeHome == IntPtr.Zero) 904Debug.Assert(pvArrayMarshaler != IntPtr.Zero, "pvArrayMarshaler must not be null"); 959IntPtr.Zero, // not needed as we marshal primitive VTs only 962IntPtr.Zero); // not needed as we marshal primitive VTs only 998IntPtr.Zero); // unmanaged buffer will be allocated 1124return IntPtr.Zero; 1185if (pNativeHome == IntPtr.Zero) 1201if (pNativeHome == IntPtr.Zero) 1220if (pNativeHome != IntPtr.Zero)
src\System\Threading\Thread.CoreCLR.cs (1)
75if (thread == IntPtr.Zero)
System.Reflection.Metadata (6)
System\Reflection\Internal\MemoryBlocks\NativeHeapMemoryBlock.cs (2)
46IntPtr ptr = Interlocked.Exchange(ref _pointer, IntPtr.Zero); 47if (ptr != IntPtr.Zero)
System\Reflection\Metadata\MetadataReaderProvider.cs (2)
50/// <exception cref="ArgumentNullException"><paramref name="start"/> is <see cref="IntPtr.Zero"/>.</exception> 64/// <exception cref="ArgumentNullException"><paramref name="start"/> is <see cref="IntPtr.Zero"/>.</exception>
System\Reflection\PortableExecutable\PEReader.cs (2)
49/// <exception cref="ArgumentNullException"><paramref name="peImage"/> is <see cref="IntPtr.Zero"/>.</exception> 67/// <exception cref="ArgumentNullException"><paramref name="peImage"/> is <see cref="IntPtr.Zero"/>.</exception>
System.Security.Cryptography (109)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.cs (1)
26if (ret == IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EcKey.cs (1)
66if (objCurveName != IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
102if (handle == IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.DigestAlgs.cs (5)
32s_evpMd5 != IntPtr.Zero ? s_evpMd5 : (s_evpMd5 = CryptoNative_EvpMd5()); 38s_evpSha1 != IntPtr.Zero ? s_evpSha1 : (s_evpSha1 = CryptoNative_EvpSha1()); 44s_evpSha256 != IntPtr.Zero ? s_evpSha256 : (s_evpSha256 = CryptoNative_EvpSha256()); 50s_evpSha384 != IntPtr.Zero ? s_evpSha384 : (s_evpSha384 = CryptoNative_EvpSha384()); 56s_evpSha512 != IntPtr.Zero ? s_evpSha512 : (s_evpSha512 = CryptoNative_EvpSha512());
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.Rsa.cs (1)
19Debug.Assert(rsa != IntPtr.Zero);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OCSP.cs (2)
108handle = IntPtr.Zero; 123handle = IntPtr.Zero;
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Stack.cs (4)
67base(IntPtr.Zero, ownsHandle: true) 74SetHandle(IntPtr.Zero); 80get { return handle == IntPtr.Zero; } 104base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509StoreCtx.cs (3)
75base(IntPtr.Zero, ownsHandle: true) 87SetHandle(IntPtr.Zero); 93get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (11)
12base(IntPtr.Zero, ownsHandle: true) 19SetHandle(IntPtr.Zero); 25get { return handle == IntPtr.Zero; } 32base(IntPtr.Zero, ownsHandle: true) 39SetHandle(IntPtr.Zero); 45get { return handle == IntPtr.Zero; } 52base(IntPtr.Zero, ownsHandle: true) 59SetHandle(IntPtr.Zero); 65get { return handle == IntPtr.Zero; } 72base(IntPtr.Zero, ownsHandle: true) 80base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBignumHandle.Unix.cs (3)
13base(IntPtr.Zero, ownsHandle: true) 25SetHandle(IntPtr.Zero); 31get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (3)
16base(IntPtr.Zero, ownsHandle: true) 23SetHandle(IntPtr.Zero); 44return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeDsaHandle.Unix.cs (4)
14base(IntPtr.Zero, ownsHandle: true) 21SetHandle(IntPtr.Zero); 27get { return handle == IntPtr.Zero; } 32Debug.Assert(handle != IntPtr.Zero);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEcKeyHandle.Unix.cs (4)
14base(IntPtr.Zero, ownsHandle: true) 21SetHandle(IntPtr.Zero); 27get { return handle == IntPtr.Zero; } 32Debug.Assert(handle != IntPtr.Zero);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEvpCipherCtxHandle.Unix.cs (3)
13base(IntPtr.Zero, ownsHandle: true) 20SetHandle(IntPtr.Zero); 26get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEvpMdCtxHandle.Unix.cs (2)
13base(IntPtr.Zero, ownsHandle: true) 25get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEvpPkeyCtxHandle.Unix.cs (3)
12: base(IntPtr.Zero, ownsHandle: true) 24SetHandle(IntPtr.Zero); 28public override bool IsInvalid => handle == IntPtr.Zero;
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeHmacCtxHandle.Unix.cs (3)
12base(IntPtr.Zero, ownsHandle: true) 19SetHandle(IntPtr.Zero); 25get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (2)
28SetHandle(IntPtr.Zero); 38return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafePkcs7Handle.Unix.cs (3)
12base(IntPtr.Zero, ownsHandle: true) 19SetHandle(IntPtr.Zero); 25get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (9)
31base(IntPtr.Zero, ownsHandle: true) 38SetHandle(IntPtr.Zero); 44get { return handle == IntPtr.Zero; } 51base(IntPtr.Zero, ownsHandle: true) 58SetHandle(IntPtr.Zero); 64get { return handle == IntPtr.Zero; } 71base(IntPtr.Zero, ownsHandle: true) 78SetHandle(IntPtr.Zero); 84get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (6)
13base(IntPtr.Zero, ownsHandle: true) 20SetHandle(IntPtr.Zero); 26get { return handle == IntPtr.Zero; } 33base(IntPtr.Zero, ownsHandle: true) 40SetHandle(IntPtr.Zero); 46get { return handle == IntPtr.Zero; }
src\libraries\Common\src\System\Security\Cryptography\RSAOpenSsl.cs (2)
190IntPtr hashAlgorithm = IntPtr.Zero; 257IntPtr hashAlgorithm = IntPtr.Zero;
System\Security\Cryptography\AesCcm.OpenSsl.cs (1)
162return IntPtr.Zero;
System\Security\Cryptography\AesGcm.OpenSsl.cs (1)
131return IntPtr.Zero;
System\Security\Cryptography\ChaCha20Poly1305.OpenSsl.cs (2)
13Interop.Crypto.EvpChaCha20Poly1305() != IntPtr.Zero; 128return IntPtr.Zero;
System\Security\Cryptography\DSAOpenSsl.cs (1)
75if (handle == IntPtr.Zero)
System\Security\Cryptography\ECDiffieHellmanOpenSsl.cs (1)
62if (handle == IntPtr.Zero)
System\Security\Cryptography\ECDsaOpenSsl.cs (1)
62if (handle == IntPtr.Zero)
System\Security\Cryptography\FixedMemoryKeyBox.cs (2)
12internal FixedMemoryKeyBox(ReadOnlySpan<byte> key) : base(IntPtr.Zero, ownsHandle: true) 29public override bool IsInvalid => handle == IntPtr.Zero;
System\Security\Cryptography\HashProviderDispenser.OpenSsl.cs (1)
48Debug.Assert(evpType != IntPtr.Zero);
System\Security\Cryptography\HashProviderDispenser.Unix.cs (2)
41Debug.Assert(evpType != IntPtr.Zero); 59Debug.Assert(evpType != IntPtr.Zero);
System\Security\Cryptography\LiteHash.Unix.cs (3)
40Debug.Assert(algorithm != IntPtr.Zero); 118Debug.Assert(algorithm != IntPtr.Zero); 193Debug.Assert(algorithm != IntPtr.Zero);
System\Security\Cryptography\OidLookup.OpenSsl.cs (3)
20IntPtr friendlyNamePtr = IntPtr.Zero; 26Debug.Assert(friendlyNamePtr != IntPtr.Zero, "friendlyNamePtr != IntPtr.Zero"); 45if (sharedObject == IntPtr.Zero)
System\Security\Cryptography\OpenSslCipherLite.cs (1)
32Debug.Assert(algorithm != IntPtr.Zero);
System\Security\Cryptography\RSAOpenSsl.cs (1)
43if (handle == IntPtr.Zero)
System\Security\Cryptography\SafeEvpPKeyHandle.OpenSsl.cs (3)
20base(IntPtr.Zero, ownsHandle: true) 37SetHandle(IntPtr.Zero); 43get { return handle == IntPtr.Zero; }
System\Security\Cryptography\X509Certificates\OpenSslCrlCache.cs (1)
138if (nextUpdatePtr == IntPtr.Zero)
System\Security\Cryptography\X509Certificates\OpenSslX509CertificateReader.cs (2)
28if (handle == IntPtr.Zero) 256get { return _cert == null ? IntPtr.Zero : _cert.DangerousGetHandle(); }
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (2)
220IntPtr lastCert = IntPtr.Zero; 888if (elementCertPtr == IntPtr.Zero)
System\Security\Cryptography\X509Certificates\OpenSslX509Encoder.cs (1)
251if (oidPtr == IntPtr.Zero)
System\Security\Cryptography\X509Certificates\X509Certificate.cs (1)
245public IntPtr Handle => Pal is null ? IntPtr.Zero : Pal.Handle;
System\Security\Cryptography\X509Certificates\X509Chain.cs (2)
69return IntPtr.Zero; 110if (customCertificate == null || customCertificate.Handle == IntPtr.Zero)
System\Security\Cryptography\X509Certificates\X509Store.cs (1)
94return IntPtr.Zero;
System.Text.Encoding.CodePages (3)
Microsoft\Win32\SafeHandles\SafeAllocHHandle.cs (2)
21get { return new SafeAllocHHandle(IntPtr.Zero); } 26if (handle != IntPtr.Zero)
System\Text\BaseCodePageEncoding.cs (1)
408if (safeNativeMemoryHandle != null && safeNativeMemoryHandle.DangerousGetHandle() == IntPtr.Zero)
System.Windows.Controls.Ribbon (7)
Microsoft\Windows\Controls\Ribbon\NativeMethods.cs (1)
360if (hDc == IntPtr.Zero)
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (1)
1611if (monitorPtr != IntPtr.Zero)
Microsoft\Windows\Controls\Ribbon\RibbonDropDownHelper.cs (1)
175if (monitor != IntPtr.Zero)
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (4)
1005if (hwnd != IntPtr.Zero) 1028IntPtr capturedHwnd = IntPtr.Zero; 1035if (capturedHwnd != IntPtr.Zero && 1050(capturedHwnd == IntPtr.Zero ||
UIAutomationClient (62)
MS\Internal\Automation\Accessible.cs (3)
66if (_hwnd == IntPtr.Zero) 72_hwnd = IntPtr.Zero; 83_hwnd = IntPtr.Zero;
MS\Internal\Automation\BoundingRectTracker.cs (1)
48if ( hwnd == IntPtr.Zero || idObject != UnsafeNativeMethods.OBJID_WINDOW )
MS\Internal\Automation\ClickablePoint.cs (1)
37if (SafeNativeMethods.MonitorFromRect( ref winRect, SafeNativeMethods.MONITOR_DEFAULTTONULL ) == IntPtr.Zero)
MS\Internal\Automation\FocusTracker.cs (6)
48if (hwnd != IntPtr.Zero) 81if (hwnd != IntPtr.Zero) 254if (hwndCur == IntPtr.Zero || !SafeNativeMethods.IsWindow(NativeMethods.HWND.Cast(hwndCur))) 270HandleFocusChange(IntPtr.Zero, null, 0, 0, eventTime); 294IntPtr i = Misc.SendMessageTimeout(NativeMethods.HWND.Cast(hwnd), UnsafeNativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero);
MS\Internal\Automation\HwndProxyElementProvider.cs (19)
125IntPtr len = Misc.SendMessageTimeout( _hwnd, UnsafeNativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero ); 135if (Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETTEXT, new IntPtr(ilen + 1), str) == IntPtr.Zero) 354if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_MINIMIZE, IntPtr.Zero)) 375if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_MAXIMIZE, IntPtr.Zero)) 397if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_CLOSE, IntPtr.Zero)) 589IntPtr ret = UnsafeNativeMethods.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero, UnsafeNativeMethods.SMTO_ABORTIFHUNG, 0, out dwResult); 590if ( ret == IntPtr.Zero ) 809Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETMINMAXINFO, IntPtr.Zero, ref minMaxInfo); 874if (hmenu != IntPtr.Zero) 919if (hmenu != IntPtr.Zero) 1007if (GetMenuBarInfo(_hwnd, UnsafeNativeMethods.OBJID_SYSMENU, 0, out mbi) && mbi.hMenu != IntPtr.Zero) 1012return IntPtr.Zero; 1738if (hrgn == IntPtr.Zero) 1834IntPtr lr = Misc.SendMessageTimeout( hChild, UnsafeNativeMethods.WM_NCHITTEST, IntPtr.Zero, MAKELPARAM( (int)x, (int)y ) ); 2011if (parent == IntPtr.Zero) 2015IntPtr lresult = Misc.SendMessageTimeout(parent, UnsafeNativeMethods.WM_MDIACTIVATE, (IntPtr)hwnd, IntPtr.Zero); 2016return lresult == IntPtr.Zero;
MS\Internal\Automation\MenuTracker.cs (1)
58if( hwnd == IntPtr.Zero )
MS\Internal\Automation\Misc.cs (8)
284if (result == IntPtr.Zero) 408IntPtr result = IntPtr.Zero; 426if ((result == IntPtr.Zero) && (error != 0)) 527if (processHandle == IntPtr.Zero 542if (processHandle == IntPtr.Zero) 598if (smtoRetVal == IntPtr.Zero) 615if (smtoRetVal == IntPtr.Zero) 632if (smtoRetVal == IntPtr.Zero)
MS\Internal\Automation\ProxyManager.cs (1)
799IntPtr result = Misc.SendMessageTimeout(hwnd, UnsafeNativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX);
MS\Internal\Automation\SafeHandles.cs (6)
26: base(IntPtr.Zero, true) 34get { return handle == IntPtr.Zero; } 50: base(IntPtr.Zero, true) 57get { return handle == IntPtr.Zero; } 71: base(IntPtr.Zero, true) 77get { return handle == IntPtr.Zero; }
MS\Internal\Automation\UiaCoreApi.cs (2)
166if (_pProperties != IntPtr.Zero) 624if (pInts == IntPtr.Zero)
MS\Internal\Automation\WindowHideOrCloseTracker.cs (1)
57if (hwnd == IntPtr.Zero)
MS\Internal\Automation\WindowInteractionStateTracker.cs (1)
56if (hwnd == IntPtr.Zero)
MS\Internal\Automation\WindowShowOrOpenTracker.cs (1)
58if (hwnd == IntPtr.Zero)
MS\Internal\Automation\WindowVisualStateTracker.cs (1)
53if (hwnd == IntPtr.Zero)
MS\Internal\Automation\WinEventWrap.cs (4)
116_hHooks[i] = UnsafeNativeMethods.SetWinEventHook(eventId, eventId, IntPtr.Zero, _winEventProc, 0, 0, _fFlags); 117if (_hHooks[i] == IntPtr.Zero) 136if (_hHooks[i] != IntPtr.Zero) 143_hHooks[i] = IntPtr.Zero;
MS\Win32\NativeMethods.cs (1)
53hTemp.h = IntPtr.Zero;
System\Windows\Automation\AutomationElement.cs (1)
434Misc.ValidateArgument(hwnd != IntPtr.Zero, nameof(SR.HwndMustBeNonNULL));
System\Windows\Automation\Condition.cs (2)
23: base(IntPtr.Zero, true) 31get { return handle == IntPtr.Zero; }
System\Windows\Automation\Text\TextRange.cs (2)
29: base(IntPtr.Zero, true) 36get { return handle == IntPtr.Zero; }
UIAutomationClientSideProviders (647)
MS\Internal\AutomationProxies\Accessible.cs (6)
165IntPtr wParam = IntPtr.Zero; 171if (lResult == IntPtr.Zero) 451bool inSameHwnd = Window != IntPtr.Zero && Window == hwnd; 862if (_hwnd == IntPtr.Zero) 869_hwnd = IntPtr.Zero; 884_hwnd = IntPtr.Zero;
MS\Internal\AutomationProxies\ClickablePoint.cs (7)
27_hwndProgman = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Progman", null); 28if (_hwndProgman == IntPtr.Zero) 67for (hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); hwnd != IntPtr.Zero; hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDNEXT)) 82if (hwnd == IntPtr.Zero) 101if (hwnd == IntPtr.Zero) 266int lr = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\CommonGetThemePartSize.cs (4)
32_hTheme = new SafeThemeHandle(IntPtr.Zero, false); 62fSuccess = GetThemePartSize(_hTheme, IntPtr.Zero, iPartId, iStateId, IntPtr.Zero, (int)THEMESIZE.TS_TRUE, &size) == IntPtr.Zero;
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (1)
48SetHandle(Misc.VirtualAllocEx(_processHandle, IntPtr.Zero, new UIntPtr((uint)cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE));
MS\Internal\AutomationProxies\CommonXSendMessage.cs (55)
111if (!ignoreSendResult && result == IntPtr.Zero) 141if (IsWOW64Process(IntPtr.Zero)) 197if (Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address) == IntPtr.Zero) 241if ((errorCode != ErrorValue.NoCheck) && ((errorCode == ErrorValue.Zero && res == IntPtr.Zero) || (errorCode == ErrorValue.NotZero && res != IntPtr.Zero))) 288if ((errorCode != ErrorValue.NoCheck) && ((errorCode == ErrorValue.Zero && res == IntPtr.Zero) || (errorCode == ErrorValue.NotZero && res != IntPtr.Zero))) 344if ((errorCode != ErrorValue.NoCheck) && ((errorCode == ErrorValue.Zero && res == IntPtr.Zero) || (errorCode == ErrorValue.NotZero && res != IntPtr.Zero))) 410return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 416return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, 425return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 467return XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()), XSendMessage.ErrorValue.NoCheck); 474bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), XSendMessage.ErrorValue.NoCheck); 486bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), XSendMessage.ErrorValue.NoCheck); 669IntPtr textAddress = IntPtr.Zero; 917return XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 924bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 937bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 958return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType())); 964return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 970return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 980IntPtr hitTestItem = IntPtr.Zero; 985if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref clientPoint, 1)) 991if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo), 1000if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo32), 1009if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo64), 1029return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 1036hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), 1044return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1192Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2); 1258if (Misc.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero) 1355if (group.pszHeader != IntPtr.Zero) 1623nativeItem.pszText = IntPtr.Zero; 1722nativeItem.pszText = IntPtr.Zero; 1723nativeItem.hbm = IntPtr.Zero; 1730nativeItem.pvFilter = IntPtr.Zero; 1826nativeItem.pszText = IntPtr.Zero; 1943nativeItem.pszText = IntPtr.Zero; 1950nativeItem.puColumns = IntPtr.Zero; 2140nativeItem.pszHeader = IntPtr.Zero; 2142nativeItem.pszFooter = IntPtr.Zero; 2223nativeItem.pszHeader = IntPtr.Zero; 2225nativeItem.pszFooter = IntPtr.Zero; 2233nativeItem.pszSubtitle = IntPtr.Zero; 2235nativeItem.pszTask = IntPtr.Zero; 2237nativeItem.pszDescriptionTop = IntPtr.Zero; 2239nativeItem.pszDescriptionBottom = IntPtr.Zero; 2245nativeItem.pszSubsetTitle = IntPtr.Zero; // NULL if group is not subset 2334nativeItem.iString = IntPtr.Zero; 2432nativeItem.hItem = IntPtr.Zero; 2435nativeItem.pszText = IntPtr.Zero; 2574nativeItem.hwnd = IntPtr.Zero; 2577nativeItem.hinst = IntPtr.Zero; 2578nativeItem.pszText = IntPtr.Zero;
MS\Internal\AutomationProxies\EventManager.cs (1)
588private static IntPtr _hwndLast = IntPtr.Zero;
MS\Internal\AutomationProxies\Misc.cs (44)
186if (result == IntPtr.Zero) 215if (label == IntPtr.Zero) 245if (!MapWindowPoints(hwnd, IntPtr.Zero, ref leftTop, 1)) 251if (!MapWindowPoints(hwnd, IntPtr.Zero, ref rightBottom, 1)) 311if (hdc == IntPtr.Zero) 323return ProxyGetGUIThreadInfo(0, out gui) ? gui.hwndFocus : IntPtr.Zero; 328if (hwndToolTip != IntPtr.Zero) 379return IntPtr.Zero; 384if (hwndParent == IntPtr.Zero || hwndParent == UnsafeNativeMethods.GetDesktopWindow()) 386return IntPtr.Zero; 393while ((peer = NativeMethodsSetLastError.GetWindow(peer, NativeMethods.GW_HWNDPREV)) != IntPtr.Zero) 398int code = Misc.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero); 427return IntPtr.Zero; 514if (hwndParent == IntPtr.Zero) 577IntPtr memAddr = IntPtr.Zero; // Ptr to remote mem 586memAddr = VirtualAlloc(IntPtr.Zero, new UIntPtr(cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE); 592if (ProxySendMessage(hwnd, uMsg, wParam, memAddr) == IntPtr.Zero) 613if (memAddr != IntPtr.Zero) 625if (resultHwnd == IntPtr.Zero) 762if (hwnd == IntPtr.Zero) 875while (hwnd != IntPtr.Zero) 908if ((IsProgmanWindow(hWndFrom) && hWndTo == IntPtr.Zero) || 909(hWndFrom == IntPtr.Zero && IsProgmanWindow(hWndTo))) 933if ((IsProgmanWindow(hWndFrom) && hWndTo == IntPtr.Zero) || 934(hWndFrom == IntPtr.Zero && IsProgmanWindow(hWndTo))) 1028if (processHandle == IntPtr.Zero 1044if (processHandle == IntPtr.Zero) 1072int index = ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 1206IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, NativeMethods.WM_GETTITLEBARINFOEX, IntPtr.Zero, ref ti, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1208if (resultSendMessage == IntPtr.Zero) 1264if (resultSendMessage == IntPtr.Zero) 1292if (resultSendMessage == IntPtr.Zero) 1318if (resultSendMessage == IntPtr.Zero) 1344if (resultSendMessage == IntPtr.Zero) 1359if (resultSendMessage == IntPtr.Zero) 1539if (RegisterHotKey(IntPtr.Zero, atom, 0, vk)) 1587if (!GetMessage(ref msg, IntPtr.Zero, 0, 0)) 1609UnregisterHotKey(IntPtr.Zero, atom); 1770if (result == IntPtr.Zero) 1783if (result == IntPtr.Zero) 1865if (hwndShell == IntPtr.Zero) 1878int commonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\MSAANativeProvider.cs (3)
58Debug.Assert(hwnd != IntPtr.Zero); 163int index = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 1083Debug.Assert(_hwnd != IntPtr.Zero);
MS\Internal\AutomationProxies\MSAAWinEventWrap.cs (4)
80_hHooks[0] = Misc.SetWinEventHook(_eventMin, _eventMax, IntPtr.Zero, _winEventProc, 0, 0, _fFlags); 81if (_hHooks[0] == IntPtr.Zero) 98if (_hHooks[i] != IntPtr.Zero) 101_hHooks[i] = IntPtr.Zero;
MS\Internal\AutomationProxies\NonClientArea.cs (3)
155if (menu == IntPtr.Zero) 219int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 550if (menu != IntPtr.Zero)
MS\Internal\AutomationProxies\ProxyHwnd.cs (7)
224if (_controlLabel == IntPtr.Zero && name != null && GetParent() == null) 232if (_controlLabel != IntPtr.Zero) 248if (hwndParent != IntPtr.Zero && hwndParent != UnsafeNativeMethods.GetDesktopWindow()) 272string text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, idChild); 275text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, 0); 489if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 512if (label != IntPtr.Zero)
MS\Internal\AutomationProxies\ProxySimple.cs (3)
100if (_hwnd == IntPtr.Zero) 174if (_hwnd == IntPtr.Zero || (GetParent() != null && GetParent()._hwnd == _hwnd)) 340return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero;
MS\Internal\AutomationProxies\QueueProcessor.cs (1)
104while (UnsafeNativeMethods.PeekMessage (ref msg, IntPtr.Zero, 0, 0, NativeMethods.PM_REMOVE))
MS\Internal\AutomationProxies\SafeProcessHandle.cs (1)
26if (hwnd == IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsAltTab.cs (2)
138if (Misc.MapWindowPoints(System.IntPtr.Zero, _hwnd, ref pt, 1)) 398if(!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (17)
196int state = Misc.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero); 326if (hwndRadioButton == IntPtr.Zero || 399if (hwndParent != IntPtr.Zero && WindowsFormsHelper.IsWindowsFormsControl(hwndParent)) 503Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero); 517Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true); 524Misc.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true); 546IntPtr hwndShell = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Shell_TrayWnd", null); 547if (hwndShell != IntPtr.Zero) 571if (hwndParent != IntPtr.Zero) 590if (hwndParent != IntPtr.Zero) 619} while (hwndParent != _hwndDesktop && hwndParent != IntPtr.Zero); 649int state = Misc.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero); 716return IntPtr.Zero;
MS\Internal\AutomationProxies\WindowsComboBox.cs (24)
259if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2)) 305if (cbInfo.hwndItem != IntPtr.Zero && IsEditableCombo()) 322if (cbInfo.hwndList != IntPtr.Zero) 343if (cbInfo.hwndItem != IntPtr.Zero && IsEditableCombo()) 360if (cbInfo.hwndList != IntPtr.Zero) 392if (hwndParent != IntPtr.Zero) 514if ((IntPtr.Zero != hwndEx) && IsComboEx (hwndEx)) 519return IntPtr.Zero; 534cbInfo.hwndItem = IntPtr.Zero; 540if (cbInfo.hwndItem == IntPtr.Zero && IsComboEx (NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT))) 542cbInfo.hwndItem = Misc.FindWindowEx(hwnd, IntPtr.Zero, "EDIT", null); 543if (cbInfo.hwndItem != IntPtr.Zero) 564return Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0; 579Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 584Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 660if (GetComboInfo(_hwnd, ref cbInfo) && (IntPtr.Zero != cbInfo.hwndList)) 676if (hwndEx == IntPtr.Zero) 700index = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 707int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 799if (hwndCombo != IntPtr.Zero) 848return _hwndEx != IntPtr.Zero; 928if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2))
MS\Internal\AutomationProxies\WindowsContainer.cs (4)
149hwndTab = IntPtr.Zero; 179if (hwndParent == IntPtr.Zero) 184hwndTab = Misc.FindWindowEx(hwndParent, IntPtr.Zero, "SysTabControl32", null); 186if (hwndTab == IntPtr.Zero || !SafeNativeMethods.IsWindowVisible(hwndTab))
MS\Internal\AutomationProxies\WindowsEditBox.cs (33)
110if (hwndParent != IntPtr.Zero) 154hwnd != IntPtr.Zero && string.IsNullOrEmpty(accessKey); 222if (hwndUpDown != IntPtr.Zero) 233if (hwndUpDown != IntPtr.Zero) 244if (hwndUpDown != IntPtr.Zero) 294int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 302result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 356if (!Misc.MapWindowPoints(IntPtr.Zero, WindowHandle, ref clientLocation, 1)) 448int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam); 520return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 527return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 533IntPtr result = Misc.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero); 539if (result == IntPtr.Zero) 550return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero); 556Debug.Assert(hfont != IntPtr.Zero, "WindowsEditBox.GetLogfont got null HFONT"); 570Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect); 590return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero); 685return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero); 691int index = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero); 745int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero); 856if (hdc == IntPtr.Zero) 861IntPtr oldFont = IntPtr.Zero; 870if (oldFont != IntPtr.Zero) 895if (hwndParent == IntPtr.Zero) 915if (hwndParent != IntPtr.Zero) 931if (hwndParent != IntPtr.Zero) 947if (hwndParent != IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (4)
248if (!Misc.MapWindowPoints(_provider.WindowHandle, IntPtr.Zero, ref w32point, 1)) 776IntPtr hdc = Misc.GetDC(IntPtr.Zero); 777if (hdc == IntPtr.Zero) 782Misc.ReleaseDC(IntPtr.Zero, hdc);
MS\Internal\AutomationProxies\WindowsGrip.cs (2)
114int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 122int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsHyperlink.cs (7)
204if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 219bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 284return XSendMessage.XSend(_hwnd, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM)); 402return XSendMessage.XSend(_hwnd, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType())); 499bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 511Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 512Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (5)
140Misc.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4)); 190if (hwndChild != IntPtr.Zero) 246while (hwndChild != IntPtr.Zero) 263for (int i = 0; ((i < index) && (hwndChild != IntPtr.Zero)); i++) 383Misc.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
MS\Internal\AutomationProxies\WindowsListBox.cs (23)
82if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && (cbInfo.hwndCombo != IntPtr.Zero)) 298int ret = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top)); 313int index = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero); 388return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0; 438return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero); 533if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && (cbInfo.hwndCombo != IntPtr.Zero)) 569int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero); 610return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 733int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 946Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 992return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 1005SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 1045return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item; 1049return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1067return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty; 1140Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1170Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1194return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (26)
502if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 531if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 796if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 1214return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1253return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero); 1278return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1288return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0; 1352return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1376IntPtr partialVisible = (partialOK) ? IntPtr.Zero : new IntPtr (1); 1384return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero); 1416if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref hitTest.pt, 1)) 1426result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1434result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1452return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1499return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1508IntPtr hwndToolTip = Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1800return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref pt, 1); 1810return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero); 1836if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader))
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (4)
331int groupIndex = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 488int groupIndex = (int)Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (3)
244return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 468XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPMETRICS, IntPtr.Zero, new IntPtr(&(metric.cbSize)), metric.cbSize, XSendMessage.ErrorValue.NoCheck); 707Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2);
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (1)
78Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (7)
139if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRectangle, 2)) 369int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero); 693if (hwndHeader == IntPtr.Zero) 767if (IntPtr.Zero == hwndEdit) 855if (hwndHeader != IntPtr.Zero) 934if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1))
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (3)
82if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 252if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 256Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (3)
172while (ancestor != IntPtr.Zero && ancestor != desktop) 376int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (67)
71if (!_expandedMenus.Contains(IntPtr.Zero)) 73_expandedMenus[IntPtr.Zero] = new MenuParentInfo(hwnd, item, type); 169if (hmenu == IntPtr.Zero) 172if (hmenu == IntPtr.Zero) 202if (hSysMenu != IntPtr.Zero) 236IntPtr hwndPopup = IntPtr.Zero; 239hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 240if (hwndPopup == IntPtr.Zero) 249if (hwndPopup != IntPtr.Zero) 256if (hmenu == IntPtr.Zero) 270if (hSubMenu == IntPtr.Zero) 278if (hwndSubMenuPopup == IntPtr.Zero) 465WinEventTracker.AddToNotificationList(IntPtr.Zero, new WinEventTracker.ProxyRaiseEvents(MenuEvents), _menuEvents, _menuEvents.Length); 486WinEventTracker.RemoveToNotificationList (IntPtr.Zero, _menuEvents, new WinEventTracker.ProxyRaiseEvents (MenuEvents), _menuEvents.Length); 535IntPtr menuParent = IntPtr.Zero; 536IntPtr hwndParent = IntPtr.Zero; 539if (menu == IntPtr.Zero) 580hwndParent = IntPtr.Zero; 581menuParent = IntPtr.Zero; 585if (hMenu == IntPtr.Zero) 603if (hMenuPossibleParent != IntPtr.Zero) 619for (IntPtr hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndMenu, WindowsMenu.MenuClassName, null); 620hwndPossibleParent != IntPtr.Zero; 621hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndPossibleParent, WindowsMenu.MenuClassName, null)) 626if (hMenuPossibleParent != IntPtr.Zero) 647for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 648hwndSubMenu != IntPtr.Zero; 649hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, MenuClassName, null)) 662return IntPtr.Zero; 674if (IntPtr.Zero != Misc.GetWindow(hwnd, NativeMethods.GW_OWNER)) 722return Misc.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero); 725return IntPtr.Zero; 752if (GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi) && mbi.hMenu != IntPtr.Zero) 757return IntPtr.Zero; 884mbi.hMenu != IntPtr.Zero && 890return IntPtr.Zero; 896if (hmenu == IntPtr.Zero) 937IntPtr hwndPopup = IntPtr.Zero; 940hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 941if (hwndPopup == IntPtr.Zero) 951return IntPtr.Zero; 1013if (parent == null && _expandedMenus.Contains(IntPtr.Zero)) 1016parentInfo = (MenuParentInfo)_expandedMenus[IntPtr.Zero]; 1424return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero; 1453if (hwndFocus != IntPtr.Zero && hwndFocus != _hwnd) 1607if (submenu == IntPtr.Zero) 1614if (hwndSubmenu != IntPtr.Zero) 1626if (submenu == IntPtr.Zero) 1633if (hwndSubmenu != IntPtr.Zero) 1903return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero); 1959if (menuItemInfo.hSubMenu != IntPtr.Zero) 1986IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 1987return (hwndSubMenu == IntPtr.Zero || !SafeNativeMethods.IsWindowVisible(hwndSubMenu)); 1992return (IntPtr.Zero == WindowsMenu.WindowFromSubmenu(submenu)); 2096for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowsMenu.MenuClassName, null); 2098hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, WindowsMenu.MenuClassName, null)) 2101if (hwndSubMenu == IntPtr.Zero) 2144if (hSubmenu == IntPtr.Zero) 2150if (hwndSubmenu != IntPtr.Zero) 2254if (gui.hwndCapture != IntPtr.Zero && Misc.ProxyGetClassName(gui.hwndCapture) == "ListBox") 2405(IntPtr.Zero != UnsafeNativeMethods.GetSubMenu (_hmenu, 0)) && 2543int length = UnsafeNativeMethods.GetMenuString(_hmenu, _item, IntPtr.Zero, 0, NativeMethods.MF_BYPOSITION); 2587if (_hwnd == IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsProgressbar.cs (5)
159int cur = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 160int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero); 161int max = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (11)
197return Misc.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero); 208return XSendMessage.XSendGetIndex(_hwnd, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType())); 290IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 329if (hwndBand != IntPtr.Zero) 348if (hwndBand != IntPtr.Zero && Misc.PtInWindowRect(hwndBand, x, y)) 381Misc.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero); 407if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2)) 428if (_hwndBand == IntPtr.Zero) 455IntPtr _hwndBand = IntPtr.Zero;
MS\Internal\AutomationProxies\WindowsRichEdit.cs (10)
193int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 200result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 613fetc.ptd = IntPtr.Zero; 620med.pUnkForRelease = IntPtr.Zero; 621med.hGlobal = IntPtr.Zero; 625if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 635if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 646if (globalMem == IntPtr.Zero) 683if (hwndParent != IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsScroll.cs (2)
321bool fRet = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero) == 0; 433int result = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (2)
702Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 704Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (3)
301if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 393if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 567Misc.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd == _hwnd ? IntPtr.Zero : _hwnd));
MS\Internal\AutomationProxies\WindowsSlider.cs (21)
173if (IntPtr.Zero != parent) 182Misc.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero); 264int value = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 269int maxValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 294return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero); 302return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero); 310return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 318return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero); 412IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 443Misc.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero); 464XSendMessage.XSend(hwnd, NativeMethods.TBM_GETCHANNELRECT, IntPtr.Zero, new IntPtr(&rcChannel), Marshal.SizeOf(rcChannel.GetType()), XSendMessage.ErrorValue.NoCheck); 466if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcChannel, 2)) 476XSendMessage.XSend(hwnd, NativeMethods.TBM_GETTHUMBRECT, IntPtr.Zero, new IntPtr(&rcThumb), Marshal.SizeOf(rcThumb.GetType()), XSendMessage.ErrorValue.NoCheck); 478if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcThumb, 2))
MS\Internal\AutomationProxies\WindowsSpinner.cs (9)
64hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 65if (hwndBuddy == IntPtr.Zero) 269return GetUpDownFromEdit(hwnd) != IntPtr.Zero; 278if (hwndParent != IntPtr.Zero) 281while (hwndChild != IntPtr.Zero) 286IntPtr hwndBuddy = Misc.ProxySendMessage(hwndChild, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 296return IntPtr.Zero;
MS\Internal\AutomationProxies\WindowsStatusBar.cs (8)
109if (hwndChild == IntPtr.Zero || hwndChild == _hwnd) 114if(hwndChild != IntPtr.Zero && hwndChild != _hwnd) 304IntPtr hwndChild = IntPtr.Zero; 309if (hwndChild == IntPtr.Zero) 340return Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero); 353info.hwnd = IntPtr.Zero; 599int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (22)
81if (hwndParent != IntPtr.Zero) 164if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 168index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 184int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 252if (hwndParent != IntPtr.Zero) 291Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 305return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 310return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 437if (hwndParent != IntPtr.Zero) 492Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 535int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 583if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2)) 678return Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1); 703int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 738Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 750IntPtr hwndDropDown = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "DropDown", null); 751if (hwndDropDown != IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsTab.cs (52)
264if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref hti.pt, 1)) 273if (updownHwnd != IntPtr.Zero && Misc.PtInWindowRect(updownHwnd, x, y)) 281index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType())); 295int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero); 319if (upDownHwnd != IntPtr.Zero) 341if (upDownHwnd != IntPtr.Zero) 507if (updownHwnd == IntPtr.Zero) 513int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 521Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 522Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 536if (updownHwnd == IntPtr.Zero) 542int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 545int posResult = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 593if (updownHwnd == IntPtr.Zero) 653int count = Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 692if (updownHwnd == IntPtr.Zero) 695int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 699Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 700Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 705return GetUpDownHwnd(_hwnd) != IntPtr.Zero; 731if (hwndParent != IntPtr.Zero 765if (childHwnd != IntPtr.Zero) 783return IntPtr.Zero; 809if (updownHwnd == IntPtr.Zero) 816int newPos = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 817int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 856Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 857Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 974IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1011Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1043if (hwndChild != IntPtr.Zero && SafeNativeMethods.IsWindowVisible(hwndChild)) 1157Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero); 1247return Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 1263return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item; 1285return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty; 1305if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1314Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1330if (hwndParent != IntPtr.Zero) 1338return Misc.FindWindowEx(hwndParent, IntPtr.Zero, null, sName); 1342return IntPtr.Zero;
MS\Internal\AutomationProxies\WindowsTitleBar.cs (3)
116int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y)); 436Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero); 450Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (20)
235int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero); 306if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 336return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero); 375bool hasImageList = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0; 376int exStyle = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero); 435if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 475return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 521Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 583return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item; 605int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 642IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 650|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 657if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 684if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
74if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 80if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (5)
97WinEventTracker.AddToNotificationList( IntPtr.Zero, new WinEventTracker.ProxyRaiseEvents( OnToolTipEvents ), _toolTipEventIds, _toolTipEventIds.Length ); 114WinEventTracker.RemoveToNotificationList( IntPtr.Zero, _toolTipEventIds, new WinEventTracker.ProxyRaiseEvents( OnToolTipEvents ), _toolTipEventIds.Length ); 249if (hwnd == IntPtr.Zero) 307if (hwnd == IntPtr.Zero) 312int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsTreeView.cs (45)
164if (hNext != IntPtr.Zero) 191return hPrev != IntPtr.Zero ? new TreeViewItem (_hwnd, this, hPrev, (int) TVItem.TopLevel) : null; 197if (hChild != IntPtr.Zero) 202for (temp = GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = GetNextItem (_hwnd, hChild)) 216IntPtr hChild = IntPtr.Zero; 219if (hChild != IntPtr.Zero) 241if (hChild != IntPtr.Zero) 244for (IntPtr temp = GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = GetNextItem (_hwnd, hChild)) 259if (hItem != IntPtr.Zero) 271if (treeItem != IntPtr.Zero) 288if (treeItem == IntPtr.Zero) 309return (IntPtr.Zero != GetSelection (_hwnd)); 394if (hItemParent == IntPtr.Zero) 453return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_CARET); 481return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_ROOT); 560IntPtr partialDisplay = (labelOnly) ? new IntPtr (1) : IntPtr.Zero; 571return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty; 602IntPtr hwndEdit = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item); 604if (hwndEdit == IntPtr.Zero) 613if (Misc.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1) 616Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero); 624Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero); 650IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 652if (hItem != IntPtr.Zero) 661int lCommonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 664return IntPtr.Zero; 870IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 915return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero; 1013if (selectionRequired || WindowsTreeView.GetSelection(_hwnd) != IntPtr.Zero) 1235Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem); 1325return hNext != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hNext, _item + 1) : null; 1335return hPrev != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hPrev, _item + 1) : null; 1343return hChild != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hChild, _item + 1) : null; 1356if (hChild != IntPtr.Zero) 1359for (IntPtr temp = WindowsTreeView.GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = WindowsTreeView.GetNextItem (_hwnd, hChild)) 1472if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1544Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1545Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1573if (address == IntPtr.Zero) 1633return UnsafeNativeMethods.GetProp(_hwnd, "MSAAStateImageMapAddr") != IntPtr.Zero; 1640if (_hItem == IntPtr.Zero) 1643int childId = Misc.ProxySendMessageInt(_hwnd, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsUpDown.cs (16)
231Misc.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0)); 234Misc.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 299if (hwndParent != IntPtr.Zero) 348int pos = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 361IntPtr hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 364if (hwndBuddy == IntPtr.Zero) 376return hwndBuddy != IntPtr.Zero && Misc.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) != -1; 385int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 399int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 482if (hwndTabParent != IntPtr.Zero) 630if (hwndParent != IntPtr.Zero) 633hwndParent = Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32") ? hwndParent : IntPtr.Zero;
MS\Internal\AutomationProxies\WinEventTracker.cs (7)
181hp._winEventHook = Misc.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT); 204if (hwnd == IntPtr.Zero) 248if (ecp._hwnd == hwnd || ecp._hwnd == IntPtr.Zero) 300if ((ecp._hwnd == IntPtr.Zero)) 365if (hwnd == IntPtr.Zero) 421if ( (hwnd == IntPtr.Zero || ecp._hwnd == hwnd) && 461Debug.Assert (hwnd == IntPtr.Zero, @"BuildEventsList: event is global but hwnd is not null");
MS\Internal\AutomationProxies\WinFormsSpinner.cs (2)
133if (hwndFirstChild == IntPtr.Zero) 140if (hwndLastChild == IntPtr.Zero)
MS\Win32\NativeMethods.cs (25)
889pszHeader = pszFooter = IntPtr.Zero; 932pszHeader = pszFooter = IntPtr.Zero; 938pszSubtitle = IntPtr.Zero; 940pszTask = IntPtr.Zero; 942pszDescriptionTop = IntPtr.Zero; 944pszDescriptionBottom = IntPtr.Zero; 950pszSubsetTitle = IntPtr.Zero; // NULL if group is not subset 1488hwndCombo = IntPtr.Zero; 1489hwndItem = IntPtr.Zero; 1490hwndList = IntPtr.Zero; 1656pszText = IntPtr.Zero; 1661lParam = IntPtr.Zero; 1677hItem = IntPtr.Zero; 1822pszText = IntPtr.Zero; 1825lParam = IntPtr.Zero; 1833pszText = IntPtr.Zero; 1836lParam = IntPtr.Zero; 1877pszText = IntPtr.Zero; 1878hbm = IntPtr.Zero; 1881lParam = IntPtr.Zero; 1885pvFilter = IntPtr.Zero; 1943hwnd = IntPtr.Zero; 1946hinst = IntPtr.Zero; 1947pszText = IntPtr.Zero; 1948lParam = IntPtr.Zero;
MS\Win32\UnsafeNativeMethods.cs (2)
378IntPtr result = IntPtr.Zero; 396if ((result == IntPtr.Zero) && (error != 0))
UIAutomationProvider (2)
System\Windows\Automation\Provider\AutomationInteropProvider.cs (2)
64ValidateArgument(hwnd != IntPtr.Zero, nameof(SR.HwndMustBeNonNULL)); 78ValidateArgument( hwnd != IntPtr.Zero, nameof(SR.HwndMustBeNonNULL));
UIAutomationTypes (41)
MS\Internal\Automation\UiaCoreTypesApi.cs (3)
74IntPtr automationCoreHandle = LoadLibraryHelper.SecureLoadLibraryEx(DllImport.UIAutomationCore, IntPtr.Zero, UnsafeNativeMethods.LoadLibraryFlags.LOAD_LIBRARY_SEARCH_SYSTEM32); 75if (automationCoreHandle != IntPtr.Zero) 78if (entryPoint != IntPtr.Zero)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\LoadLibraryHelper.cs (3)
33var hModule = IntPtr.Zero; 38hModule != IntPtr.Zero) 43UnsafeNativeMethods.GetProcAddressNoThrow(new HandleRef(null, hModule), AddDllDirectoryName) != IntPtr.Zero;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (10)
106public static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 2989public IntPtr hwndTrack = IntPtr.Zero; 3698public IntPtr hSubMenu = IntPtr.Zero; 3699public IntPtr hbmpChecked = IntPtr.Zero; 3700public IntPtr hbmpUnchecked = IntPtr.Zero; 4383if ((this.vt == (int)tagVT.VT_UNKNOWN || this.vt == (int)tagVT.VT_DISPATCH) && this.data1.Value != IntPtr.Zero) { 4387if (this.vt == (int)tagVT.VT_BSTR && this.data1.Value != IntPtr.Zero) { 4391this.data1.Value = this.data2.Value = IntPtr.Zero; 4625return (val != IntPtr.Zero); 7012public static readonly IntPtr WTS_CURRENT_SERVER_HANDLE = IntPtr.Zero;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsOther.cs (14)
371public IntPtr lpfnWndProc = IntPtr.Zero; 377public IntPtr hInstance = IntPtr.Zero; 379public IntPtr hIcon = IntPtr.Zero; 381public IntPtr hCursor = IntPtr.Zero; 383public IntPtr hbrBackground = IntPtr.Zero; 385public IntPtr lpszMenuName = IntPtr.Zero; 387public IntPtr lpszClassName = IntPtr.Zero; 389public IntPtr hIconSm = IntPtr.Zero; 586 return (LocalFree(base.handle) == IntPtr.Zero); 644public IntPtr hInstance = IntPtr.Zero; 646public IntPtr hIcon = IntPtr.Zero; 648public IntPtr hCursor = IntPtr.Zero; 650public IntPtr hbrBackground = IntPtr.Zero; 656public IntPtr hIconSm = IntPtr.Zero;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (11)
320return IntOleInitialize(IntPtr.Zero); 596IntPtr result = IntPtr.Zero; 608IntPtr result = IntPtr.Zero; 617if (result == IntPtr.Zero && errorCode != 0) 630if (retVal == IntPtr.Zero && errorCode != 0) 666if (retVal == IntPtr.Zero) 688if(result == IntPtr.Zero) 1003if(hDc == IntPtr.Zero) 1256if(retVal == IntPtr.Zero) 2893IntPtr mem = IntPtr.Zero; 2910if (mem != IntPtr.Zero)
WindowsFormsIntegration (11)
MS\Win32\NativeMethods.cs (1)
16public static IntPtr HWND_TOP = IntPtr.Zero;
MS\Win32\UnsafeNativeMethods.cs (1)
51return IntCreateDC(lpszDriver, null, null, IntPtr.Zero);
System\Windows\Automation\Peers\WindowsFormsHostAutomationPeer.cs (1)
42if(hwnd != IntPtr.Zero)
System\Windows\Integration\ElementHost.cs (3)
263if (this.HwndSource != null && this.HwndSource.Handle != IntPtr.Zero) 628return IntPtr.Zero; // This value depends on the message being processed, see MSDN for the particular message. 794if (!DesignMode && m.WParam == IntPtr.Zero)
System\Windows\Integration\WindowsFormsHost.cs (5)
144IntPtr result = IntPtr.Zero; 750private IntPtr _prevFocusHwnd = IntPtr.Zero; 773if (IntPtr.Zero == _prevFocusHwnd ) { return; } 996IntPtr.Zero) != IntPtr.Zero)
xunit.console (1)
common\AssemblyResolution\Microsoft.DotNet.PlatformAbstractions\Native\NativeMethods.Darwin.cs (1)
33if (sysctl(name, 2, buf, len, IntPtr.Zero, 0) == 0 && *len < BUFFER_LENGTH)