3839 references to Zero
aspire (10)
Processes\DetachedProcessLauncher.Windows.cs (10)
27nint.Zero, 30nint.Zero); 44var attrListSize = nint.Zero; 45InitializeProcThreadAttributeList(nint.Zero, 1, 0, ref attrListSize); 70nint.Zero, 71nint.Zero)) 81si.hStdInput = nint.Zero; 94nint.Zero, 95nint.Zero, 98nint.Zero,
csc (7)
src\roslyn\src\Compilers\Shared\BuildClient.cs (1)
356if (ptr == IntPtr.Zero)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
474return IntPtr.Zero; 583IntPtr environmentBlockPtr = IntPtr.Zero; 620if (environmentBlockPtr != IntPtr.Zero)
src\roslyn\src\Compilers\Shared\NativeMethods.cs (3)
58internal static readonly IntPtr NullPtr = IntPtr.Zero; 124lpSecurityAttributes: IntPtr.Zero, 127hTemplateFile: IntPtr.Zero);
dotnet (6)
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.10.0-1.26374.120\contentFiles\cs\net11.0\BuildServerConnection.cs (3)
474return IntPtr.Zero; 583IntPtr environmentBlockPtr = IntPtr.Zero; 620if (environmentBlockPtr != IntPtr.Zero)
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.10.0-1.26374.120\contentFiles\cs\net11.0\NativeMethods.cs (3)
58internal static readonly IntPtr NullPtr = IntPtr.Zero; 124lpSecurityAttributes: IntPtr.Zero, 127hTemplateFile: IntPtr.Zero);
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityUtils.cs (1)
860return certificate != null && certificate.Handle != IntPtr.Zero;
ILCompiler.Compiler (2)
Compiler\Disassembler.cs (2)
95if (_handle == IntPtr.Zero) 133_handle = IntPtr.Zero;
ILCompiler.ReadyToRun (5)
JitInterface\CorInfoImpl.ReadyToRun.cs (1)
3127*pCookieVal = IntPtr.Zero;
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (3)
94if (s_jit != IntPtr.Zero) 177if (_jit == IntPtr.Zero) 349if (exception != IntPtr.Zero)
src\runtime\src\coreclr\tools\Common\JitInterface\JitConfigProvider.cs (1)
62IntPtr libHandle = IntPtr.Zero;
ILCompiler.RyuJit (5)
JitInterface\CorInfoImpl.RyuJit.cs (1)
1954*pCookieVal = IntPtr.Zero;
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (3)
94if (s_jit != IntPtr.Zero) 177if (_jit == IntPtr.Zero) 349if (exception != IntPtr.Zero)
src\runtime\src\coreclr\tools\Common\JitInterface\JitConfigProvider.cs (1)
62IntPtr libHandle = IntPtr.Zero;
Infrastructure.Common (4)
SafeKeychainHandle.cs (4)
34: base(IntPtr.Zero, ownsHandle: true) 42SetHandle(IntPtr.Zero); 46public override bool IsInvalid => handle == IntPtr.Zero; 53int osStatus = SecKeychainCreate(pathName, utf8Passphrase.Length, utf8Passphrase, false, IntPtr.Zero, out keychain);
libmscordaccore_universal (14)
Entrypoints.cs (14)
30*handle = IntPtr.Zero; 177*obj = IntPtr.Zero; 183object? legacyImpl = legacyImplPtr != IntPtr.Zero 194*obj = IntPtr.Zero; 213if (handle == IntPtr.Zero) 215*obj = IntPtr.Zero; 222*obj = IntPtr.Zero; 227if (legacyImplPtr != IntPtr.Zero) 232*obj = IntPtr.Zero; 244*obj = IntPtr.Zero; 267if (pTarget == IntPtr.Zero 307return CLRDataCreateInstanceImpl(pIID, pLegacyTarget, IntPtr.Zero, iface); 312if (pLegacyTarget == IntPtr.Zero || iface == null) 330object? legacyImpl = pLegacyImpl != IntPtr.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.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.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 (26)
_generated\10\Windows.Win32.HRESULT.g.cs (1)
68 /// error. You can specify <see cref="IntPtr.Zero"/> to use the current IErrorInfo interface, or
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 (2)
60ServiceNames = (HTTP_SERVICE_BINDING_BASE**)IntPtr.Zero, 118Debug.Assert(info != IntPtr.Zero, "SetUrlGroupProperty called with invalid pointer");
RequestProcessing\RequestContext.cs (7)
248bytesReturned: IntPtr.Zero, 249overlapped: IntPtr.Zero); 295overlapped: IntPtr.Zero); 352overlapped: IntPtr.Zero); 389bytesReturned: IntPtr.Zero, 390IntPtr.Zero); 413(uint)sizeof(HTTP_REQUEST_PROPERTY_STREAM_ERROR), IntPtr.Zero);
RequestProcessing\Response.cs (4)
350IntPtr.Zero, 353IntPtr.Zero); 368IntPtr.Zero, 371IntPtr.Zero);
RequestProcessing\ResponseBody.cs (4)
357IntPtr.Zero, 360IntPtr.Zero); 685IntPtr.Zero, 688IntPtr.Zero);
Microsoft.AspNetCore.Server.IIS (17)
_generated\8\Windows.Win32.HRESULT.g.cs (1)
68 /// error. You can specify <see cref="IntPtr.Zero"/> to use the current IErrorInfo interface, or
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 (3)
461overlapped: IntPtr.Zero); 484IntPtr.Zero); 907if (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.Build.Framework (4)
NativeMethods.cs (4)
1327IntPtr ptr = IntPtr.Zero; 1330ptr = realpath_native(path, IntPtr.Zero); 1331if (ptr == IntPtr.Zero) 1340if (ptr != IntPtr.Zero)
Microsoft.Build.Tasks.CodeAnalysis (6)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
474return IntPtr.Zero; 583IntPtr environmentBlockPtr = IntPtr.Zero; 620if (environmentBlockPtr != IntPtr.Zero)
src\roslyn\src\Compilers\Shared\NativeMethods.cs (3)
58internal static readonly IntPtr NullPtr = IntPtr.Zero; 124lpSecurityAttributes: IntPtr.Zero, 127hTemplateFile: IntPtr.Zero);
Microsoft.Build.Tasks.Core (12)
ManifestUtil\mansign2.cs (12)
776IntPtr ppTsContext = IntPtr.Zero; 777IntPtr ppTsSigner = IntPtr.Zero; 778IntPtr phStore = IntPtr.Zero; 812pszTSAPolicyId = IntPtr.Zero, 843if (ppTsContext != IntPtr.Zero) 848if (ppTsSigner != IntPtr.Zero) 853if (phStore != IntPtr.Zero) 1281if (signerInfo.pChainContext != IntPtr.Zero) 1287if (signerInfo.pwszHash != IntPtr.Zero) 1291if (signerInfo.pwszDescription != IntPtr.Zero) 1295if (signerInfo.pwszDescriptionUrl != IntPtr.Zero) 1402if (timestamperInfo.pChainContext != IntPtr.Zero)
Microsoft.CodeAnalysis (9)
DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (1)
210return IntPtr.Zero;
DiaSymReader\SymUnmanagedFactory.cs (2)
121if (moduleHandle == IntPtr.Zero) 130if (createAddress == IntPtr.Zero)
MetadataReader\PEModule.cs (3)
150Debug.Assert((peReader == null) ^ (metadataOpt == IntPtr.Zero && metadataSizeOpt == 0)); 151Debug.Assert(metadataOpt == IntPtr.Zero || metadataSizeOpt > 0); 242if (_metadataPointerOpt != IntPtr.Zero)
MetadataReference\ModuleMetadata.cs (2)
35_module = new PEModule(this, peReader: peReader, metadataOpt: IntPtr.Zero, metadataSizeOpt: 0, includeEmbeddedInteropTypes: false, ignoreAssemblyRefs: false); 115Debug.Assert(metadata != IntPtr.Zero);
StrongName\DesktopStrongNameProvider.cs (1)
230strongName.StrongNameSignatureGeneration(filePath, keyName, IntPtr.Zero, 0, null, pcbSignatureBlob: out _);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
98return GenerateMemberAccess(nameof(IntPtr.Zero));
Microsoft.CodeAnalysis.CSharp.Features (1)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
98return GenerateMemberAccess(nameof(IntPtr.Zero));
Microsoft.CodeAnalysis.Scripting (3)
src\roslyn\src\Compilers\Shared\GlobalAssemblyCacheHelpers\ClrGlobalAssemblyCache.cs (1)
144int hr = CreateAssemblyEnum(out enumerator, applicationContext, partialNameFilter, ASM_CACHE.GAC, IntPtr.Zero);
src\roslyn\src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (2)
437Marshal.ThrowExceptionForHR(CreateAssemblyNameObject(out result, null, 0, IntPtr.Zero)); 509int hr = CreateAssemblyNameObject(out result, displayName, CANOF.PARSE_DISPLAY_NAME, IntPtr.Zero);
Microsoft.CodeAnalysis.Workspaces (1)
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (1)
210return IntPtr.Zero;
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (1)
MonoMSBuildDiscovery.cs (1)
60var ptr = Unix_realpath(path, IntPtr.Zero);
Microsoft.CSharp (25)
Microsoft\CSharp\RuntimeBinder\ComInterop\ComRuntimeHelpers.cs (4)
152if (typeInfoPtr == IntPtr.Zero) 176if (pAttrs == IntPtr.Zero) 197if (pAttrs == IntPtr.Zero) 282if (interfacePointer != IntPtr.Zero)
Microsoft\CSharp\RuntimeBinder\ComInterop\DispatchArgBuilder.cs (2)
46Expression.Constant(IntPtr.Zero), 58Expression.Equal(value, Expression.Constant(IntPtr.Zero)),
Microsoft\CSharp\RuntimeBinder\ComInterop\DynamicVariantExtensions.cs (2)
382variant = ComVariant.CreateRaw(VarEnum.VT_UNKNOWN, value is null ? IntPtr.Zero : Marshal.GetIUnknownForObject(value)); 387variant = ComVariant.CreateRaw(VarEnum.VT_DISPATCH, value is null ? IntPtr.Zero : Marshal.GetIDispatchForObject(value));
Microsoft\CSharp\RuntimeBinder\ComInterop\ExcepInfo.cs (3)
38if (bstr == IntPtr.Zero) 45bstr = IntPtr.Zero; 52Debug.Assert(pfnDeferredFillIn == IntPtr.Zero);
Microsoft\CSharp\RuntimeBinder\ComInterop\IDispatchComObject.cs (8)
327if (pFuncDesc == IntPtr.Zero) 429IntPtr funcDescHandleToRelease = IntPtr.Zero; 464if (funcDescHandleToRelease != IntPtr.Zero) 478IntPtr typeInfoPtr = IntPtr.Zero; 482if (typeInfoPtr != IntPtr.Zero) 489if (typeInfoPtr != IntPtr.Zero) 552IntPtr funcDescHandleToRelease = IntPtr.Zero; 608if (funcDescHandleToRelease != IntPtr.Zero)
Microsoft\CSharp\RuntimeBinder\ComInterop\StringArgBuilder.cs (1)
56Expression.Equal(value, Expression.Constant(IntPtr.Zero)),
Microsoft\CSharp\RuntimeBinder\ComInterop\UnknownArgBuilder.cs (2)
46Expression.Constant(IntPtr.Zero), 58Expression.Equal(value, Expression.Constant(IntPtr.Zero)),
src\runtime\src\libraries\Common\src\System\Runtime\InteropServices\BuiltInVariantExtensions.cs (1)
32variant.GetRawDataRef<IntPtr>() = IntPtr.Zero;
src\runtime\src\libraries\Common\src\System\Runtime\InteropServices\ComEventsSink.cs (2)
214if (pVarResult != IntPtr.Zero) 235ppv = IntPtr.Zero;
Microsoft.Diagnostics.NETCore.Client (6)
DiagnosticsServerRouter\DiagnosticsServerRouterFactory.cs (3)
79IntPtr.Zero, 80IntPtr.Zero, 81IntPtr.Zero);
ReversedServer\ReversedDiagnosticsServer.cs (3)
409IntPtr.Zero, 410IntPtr.Zero, 411IntPtr.Zero);
Microsoft.DiaSymReader (4)
SymUnmanagedFactory.cs (2)
136if (moduleHandle == IntPtr.Zero) 146if (createAddress == IntPtr.Zero)
Utilities\ComStreamWrapper.cs (2)
200return IntPtr.Zero; 224if (unmanaged != IntPtr.Zero)
Microsoft.DotNet.Build.Tasks.Feed (1)
src\common\NativeMethods.cs (1)
24hardLinkCreated = CreateHardLink(newFileName, exitingFileName, IntPtr.Zero /* reserved, must be NULL */);
Microsoft.DotNet.NativeWrapper (3)
Interop.cs (1)
68return IntPtr.Zero;
NETBundlesNativeWrapper.cs (2)
11IntPtr reserved = IntPtr.Zero; 12IntPtr resultContext = IntPtr.Zero;
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Windows\Network\WindowsTcpStateInfo.cs (1)
108var tcpTable = IntPtr.Zero;
Microsoft.ML.ImageAnalytics (1)
MLImage.cs (1)
166if (pixelsPtr == IntPtr.Zero || _image.ByteCount <= 0)
Microsoft.ML.TensorFlow (5)
TensorflowTransform.cs (3)
364if (graph == IntPtr.Zero) 513if (Session?.graph != IntPtr.Zero) 518if (Session != null && Session != IntPtr.Zero)
TensorflowUtils.cs (2)
591if (_session == IntPtr.Zero) 600_operations.Length, IntPtr.Zero, _status.Handle);
Microsoft.ML.TestFrameworkCommon (8)
Utility\LibraryLoader.cs (7)
49if (ret == IntPtr.Zero) 71IntPtr ret = IntPtr.Zero; 75if (ret != IntPtr.Zero) 81if (ret == IntPtr.Zero) 102if (ret != IntPtr.Zero) 109return IntPtr.Zero; 135if (handle == IntPtr.Zero)
Utility\NativeLibrary.cs (1)
139if (functionPtr == IntPtr.Zero)
Microsoft.ML.TimeSeries (4)
FftUtils.cs (4)
251if (descriptor != IntPtr.Zero) 297if (descriptor != IntPtr.Zero) 353if (descriptor != IntPtr.Zero) 399if (descriptor != IntPtr.Zero)
Microsoft.ML.Vision (7)
DnnRetrainTransform.cs (4)
384if (tensor.Length > 0 && tensor[0].TensorDataPointer != IntPtr.Zero) 390if (tensor.Length > 1 && tensor[1].TensorDataPointer != IntPtr.Zero) 606if (graph == IntPtr.Zero) 739if (_session != null && _session != IntPtr.Zero)
ImageClassificationTrainer.cs (3)
1494if (_session?.graph != IntPtr.Zero) 1499if (_session != null && _session != IntPtr.Zero) 1574IntPtr.Zero
Microsoft.NET.Sdk.Razor.Tasks (1)
src\sdk\src\RazorSdk\Tool\ServerProtocol\NativeMethods.cs (1)
45internal static readonly IntPtr NullPtr = IntPtr.Zero;
Microsoft.Private.Windows.Core (2)
_generated\119\Windows.Win32.HRESULT.g.cs (1)
68 /// error. You can specify <see cref="IntPtr.Zero"/> to use the current IErrorInfo interface, or
src\winforms\src\Microsoft.Private.Windows.Polyfills\Exceptions\ArgumentNullExtensions.cs (1)
40if (argument == IntPtr.Zero)
Microsoft.TestPlatform.Extensions.BlameDataCollector (2)
MiniDumpWriteDump.cs (2)
55if (NativeMethods.MiniDumpWriteDump(process.Handle, (uint)process.Id, stream.SafeFileHandle, dumpType, ref exceptionInfo, IntPtr.Zero, IntPtr.Zero))
Microsoft.VisualStudio.TestPlatform.ObjectModel (3)
Navigation\FullSymbolReader.cs (1)
139int hResult = _source.LoadDataForExe(filename, searchPath, IntPtr.Zero);
Navigation\NativeMethods.cs (2)
562IntPtr modHandle = LoadLibraryEx(Path.Combine(nativeDllDirectory, "msdia140.dll"), IntPtr.Zero, 0); 564if (modHandle == IntPtr.Zero)
Microsoft.Win32.Msi (2)
UserInterfaceHandler.cs (1)
35_previousHandler = NativeMethods.MsiSetExternalUI(Handler, (uint)messageFilter, IntPtr.Zero);
WindowsInstaller.cs (1)
216return (InstallUILevel)NativeMethods.MsiSetInternalUI((uint)uiLevel, IntPtr.Zero);
Microsoft.Win32.Registry (4)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (4)
33GetMessage(errorCode, IntPtr.Zero); 38if (moduleHandle != IntPtr.Zero) 47int length = FormatMessage(flags, moduleHandle, unchecked((uint)errorCode), 0, bufferPtr, stackBuffer.Length, IntPtr.Zero); 62int length = FormatMessage(flags | FORMAT_MESSAGE_ALLOCATE_BUFFER, moduleHandle, unchecked((uint)errorCode), 0, &nativeMsgPtr, 0, IntPtr.Zero);
Microsoft.Win32.SystemEvents (25)
Microsoft\Win32\SystemEvents.cs (25)
71private static volatile IntPtr s_processWinStation = IntPtr.Zero; 78if (hwinsta != IntPtr.Zero && s_processWinStation != hwinsta) 372if (s_defWindowProc == IntPtr.Zero) 392Interop.User32.WM_CREATETIMER, (IntPtr)interval, IntPtr.Zero); 395if (timerId == IntPtr.Zero) 404if (_windowHandle != IntPtr.Zero) 413_windowHandle = IntPtr.Zero; 417if (Interop.User32.IsWindow(handle) && DefWndProc != IntPtr.Zero) 441Interop.User32.PostMessageW(handle, Interop.User32.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 492if (requireHandle && s_systemEvents._windowHandle == IntPtr.Zero) 509if (retval != IntPtr.Zero) 6920, 0, 0, 0, IntPtr.Zero, IntPtr.Zero, 693hInstance, IntPtr.Zero); 782Interop.User32.PostMessageW(s_systemEvents!._windowHandle, s_threadCallbackMessage, IntPtr.Zero, IntPtr.Zero); 791if (s_systemEvents!._windowHandle != IntPtr.Zero) 794Interop.User32.WM_KILLTIMER, timerId, IntPtr.Zero); 809IntPtr res = Interop.User32.SetTimer(_windowHandle, timerId, (int)wParam, IntPtr.Zero); 810return (res == IntPtr.Zero ? IntPtr.Zero : timerId); 1181_windowHandle = IntPtr.Zero; 1189return IntPtr.Zero; 1210if (_windowHandle != IntPtr.Zero)
NuGet.Packaging (22)
Signing\Cms\NativeCms.cs (11)
85var pointer = IntPtr.Zero; 137pvStructInfo: IntPtr.Zero, 220IntPtr.Zero, 221IntPtr.Zero, 222IntPtr.Zero); 354pEncodePara: IntPtr.Zero, 355pvEncoded: IntPtr.Zero, 371pEncodePara: IntPtr.Zero, 470pEncodePara: IntPtr.Zero, 471pvEncoded: IntPtr.Zero, 487pEncodePara: IntPtr.Zero,
Signing\Cms\NativeMethods.cs (6)
133internal static SafeCryptMsgHandle InvalidHandle => new SafeCryptMsgHandle(IntPtr.Zero); 135public override bool IsInvalid => handle == IntPtr.Zero; 138: base(IntPtr.Zero, ownsHandle: true) 160public override bool IsInvalid { get { return handle == IntPtr.Zero; } } 172handle = IntPtr.Zero; 340if (!hCryptProvOrhNCryptKey.Equals(IntPtr.Zero)) { NativeMethods.CryptReleaseContext(hCryptProvOrhNCryptKey, 0); }
Signing\Cms\NativeUtility.cs (5)
15if (ptr != IntPtr.Zero) 72pStreamInfo: IntPtr.Zero); 124var certContextHandle = IntPtr.Zero; 131var pbData = IntPtr.Zero; 156if (certContextHandle != IntPtr.Zero)
PresentationCore (391)
MS\Internal\AppModel\CookieHandler.cs (2)
106if (UnsafeNativeMethods.InternetGetCookieEx(uriString, null, null, ref size, 0, IntPtr.Zero)) 113if (UnsafeNativeMethods.InternetGetCookieEx(uriString, null, sb, ref size, 0, IntPtr.Zero))
MS\Internal\DpiUtil\DpiUtil+DpiAwarenessScope.cs (3)
31hWnd: IntPtr.Zero) 50hWnd: IntPtr.Zero) 108(hWnd == IntPtr.Zero || !this.IsWindowUnawareOrSystemAware(hWnd)))
MS\Internal\DpiUtil\DpiUtil+HwndDpiInfo.cs (2)
45ContainingMonitorScreenRect = NearestMonitorInfoFromWindow(IntPtr.Zero).rcMonitor; 55if (hMonitor == IntPtr.Zero)
MS\Internal\DpiUtil\DpiUtil+ProcessDpiAwarenessHelper.cs (1)
90if (hWnd != IntPtr.Zero)
MS\Internal\DpiUtil\DpiUtil+SystemDpiHelper.cs (4)
103HandleRef hWndDesktop = new HandleRef(IntPtr.Zero, IntPtr.Zero); 104HandleRef hDC = new HandleRef(IntPtr.Zero, UnsafeNativeMethods.GetDC(hWndDesktop)); 105if (hDC.Handle == IntPtr.Zero)
MS\Internal\DpiUtil\DpiUtil+WindowDpiScaleHelper.cs (3)
80uint dpi = SafeNativeMethods.GetDpiForWindow(new HandleRef(IntPtr.Zero, hWnd)); 92SafeNativeMethods.MonitorFromWindow(new HandleRef(IntPtr.Zero, hWnd), NativeMethods.MONITOR_DEFAULTTONEAREST); 95int 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)
349HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 355if (dc == IntPtr.Zero) 823IntPtr.Zero 851_viewHandle = UnsafeNativeMethods.MapViewOfFileEx(_mappingHandle, UnsafeNativeMethods.FILE_MAP_READ, 0, 0, IntPtr.Zero, IntPtr.Zero);
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (17)
328if ( hModule != IntPtr.Zero ) 331new HandleRef(null, hModule), "GetAlternateList") != IntPtr.Zero ? 335return hModule != IntPtr.Zero ? true : false; 401IntPtr packets = IntPtr.Zero; 407if (packets == IntPtr.Zero) 444packets = IntPtr.Zero; 549if ( pd.pPacketProperties != IntPtr.Zero ) 564pd.pPacketProperties = IntPtr.Zero; 567if ( pd.pguidButtons != IntPtr.Zero ) 570pd.pguidButtons = IntPtr.Zero; 573if ( packets != IntPtr.Zero ) 576packets = IntPtr.Zero; 632if (pRecoAlternates[i] != IntPtr.Zero) 635pRecoAlternates[i] = IntPtr.Zero; 652IntPtr ptr = IntPtr.Zero; 666Debug.Assert(!(bestResultColumnCount != 0 && pRecoLattice->pLatticeColumns == IntPtr.Zero), "Invalid results!"); 667if ( bestResultColumnCount > 0 && pRecoLattice->pLatticeColumns != IntPtr.Zero )
MS\Internal\Interop\NativePointerCriticalHandle.cs (3)
12: base(IntPtr.Zero) 17public override bool IsInvalid => handle == IntPtr.Zero; 34handle = IntPtr.Zero;
MS\Internal\Text\TextInterface\DWriteLoader.cs (4)
20if (_dwrite == IntPtr.Zero) 33if (_dwrite != IntPtr.Zero) 37_dwrite = IntPtr.Zero; 55if (hDWriteLibrary != IntPtr.Zero)
MS\Internal\Text\TextInterface\FontCollectionLoader.cs (1)
55*fontFileEnumerator = IntPtr.Zero;
MS\Internal\TextFormatting\FullTextBreakpoint.cs (5)
61TextFormatterContext context = settings.Formatter.AcquireContext(fullText, IntPtr.Zero); 63IntPtr previousBreakRecord = IntPtr.Zero; 195if(_ploline != IntPtr.Zero) 198_ploline = IntPtr.Zero; 199_penaltyResource = IntPtr.Zero;
MS\Internal\TextFormatting\FullTextLine.cs (16)
143if (_ploline != System.IntPtr.Zero) 147_ploline = System.IntPtr.Zero; 167_ploline = IntPtr.Zero; 215TextFormatterContext context = _metrics._formatter.AcquireContext(fullText, IntPtr.Zero); 236IntPtr.Zero, // single-line formatting does not require break record 267IntPtr.Zero, // single-line formatting does not require break record 581if (_ploline != System.IntPtr.Zero) 853if(_ploline == IntPtr.Zero) 988if (_ploline == IntPtr.Zero) 1136if (_ploline == System.IntPtr.Zero) 1229if (_ploline == IntPtr.Zero) 1506if (_ploline == IntPtr.Zero) 2118if (_ploline != System.IntPtr.Zero) 2186return _metrics.GetTextLineBreak(IntPtr.Zero); 2441Debug.Assert(_ploline != IntPtr.Zero); 2494Debug.Assert(_ploline != IntPtr.Zero);
MS\Internal\TextFormatting\TextFormatterImp.cs (1)
515if (ploc == IntPtr.Zero)
MS\Internal\TextFormatting\TextMetrics.cs (3)
287IntPtr pbreakrec = IntPtr.Zero; 289if (ploline != IntPtr.Zero) 308return (pbreakrec != IntPtr.Zero) ? new TextLineBreak(null, pbreakrec) : null;
MS\Internal\TextFormatting\TextPenaltyModule.cs (2)
57if (_ploPenaltyModule != IntPtr.Zero) 60_ploPenaltyModule = IntPtr.Zero;
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\InputPaneRcw.cs (1)
24IntPtr hstring = IntPtr.Zero;
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\UISettingsRcw.cs (1)
19IntPtr hstring = IntPtr.Zero;
MS\Win32\UnsafeNativeMethodsPenimc.cs (4)
103if (_pimcActCtxCookie == IntPtr.Zero) 109if ((_pimcActCtxCookie = RegisterDllForSxSCOM()) == IntPtr.Zero) 124if (_pimcActCtxCookie != IntPtr.Zero) 128_pimcActCtxCookie = IntPtr.Zero;
MS\Win32\UnsafeNativeMethodsTablet.cs (6)
73: base(IntPtr.Zero, ownHandle) 84return IsClosed || handle == IntPtr.Zero; 90Debug.Assert(handle != IntPtr.Zero); 108: base(IntPtr.Zero, ownHandle) 119return IsClosed || handle == IntPtr.Zero; 130Debug.Assert(handle != IntPtr.Zero);
src\wpf\src\Microsoft.DotNet.Wpf\src\Common\Graphics\exports.cs (19)
340IntPtr referenceChannelHandle = IntPtr.Zero; 364if (_hChannel == IntPtr.Zero) 385if (_hChannel == IntPtr.Zero) 407if (_hChannel == IntPtr.Zero) 427if (_hChannel != IntPtr.Zero) 435if (_hChannel != IntPtr.Zero) 439_hChannel = IntPtr.Zero; 463Invariant.Assert(_hChannel != IntPtr.Zero); 522Invariant.Assert(_hChannel != IntPtr.Zero); 552Invariant.Assert(_hChannel != IntPtr.Zero); 585Invariant.Assert(_hChannel != IntPtr.Zero); 646if (_hChannel == IntPtr.Zero) 682if (_hChannel == IntPtr.Zero) 718if (_hChannel == IntPtr.Zero) 745if (_hChannel == IntPtr.Zero) 769Invariant.Assert(_hChannel != IntPtr.Zero); 788Invariant.Assert(_hChannel != IntPtr.Zero); 812Invariant.Assert(_hChannel != IntPtr.Zero); 855Invariant.Assert(_hChannel != IntPtr.Zero);
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\MimeTypeMapper.cs (1)
86IntPtr.Zero,
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
51int retval = MS.Internal.WindowsBase.NativeMethodsSetLastError.MapWindowPoints(hwnd , new HandleRef(null, IntPtr.Zero), ref rcWindowCoords, 2);
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\LoadLibraryHelper.cs (3)
29var hModule = IntPtr.Zero; 34hModule != IntPtr.Zero) 39UnsafeNativeMethods.GetProcAddressNoThrow(new HandleRef(null, hModule), AddDllDirectoryName) != IntPtr.Zero;
System\Windows\Automation\Peers\AutomationPeer.cs (4)
218_hwnd = IntPtr.Zero; 462if (_parent != null && _hwnd != IntPtr.Zero) return this; 464if((connectedPeer._hwnd) != IntPtr.Zero) 508if(peer._hwnd == IntPtr.Zero)
System\Windows\Automation\Peers\GenericRootAutomationPeer.cs (2)
38if(hwnd != IntPtr.Zero) 65if(hwnd != IntPtr.Zero)
System\Windows\DragDrop.cs (3)
448if (windowHandle != IntPtr.Zero) 469if (windowHandle != IntPtr.Zero) 891if (handle == IntPtr.Zero)
System\Windows\Input\AccessKeyManager.cs (2)
465if (hwnd != IntPtr.Zero) 474if (hwnd != IntPtr.Zero)
System\Windows\Input\Cursor.cs (4)
163_cursorHandle = UnsafeNativeMethods.LoadImageCursor(IntPtr.Zero, 240_cursorHandle = UnsafeNativeMethods.LoadImageCursor(IntPtr.Zero, 286_cursorHandle = UnsafeNativeMethods.LoadImageCursor(IntPtr.Zero, 309_cursorHandle = SafeNativeMethods.LoadCursor(new HandleRef(this,IntPtr.Zero), (IntPtr)(CursorTypes[(int)cursorType]));
System\Windows\Input\DefaultTextStore.cs (1)
81hwnd = IntPtr.Zero;
System\Windows\Input\InputElement.cs (2)
274if(sourceFrom != null && sourceFrom.Handle != IntPtr.Zero && sourceFrom.CompositionTarget != null && 275sourceTo != null && sourceTo.Handle != IntPtr.Zero && sourceTo.CompositionTarget != null)
System\Windows\Input\InputLanguageManager.cs (1)
248if (hkl == IntPtr.Zero)
System\Windows\Input\InputMethod.cs (14)
536if (hwnd != IntPtr.Zero) 571IntPtr hwnd = IntPtr.Zero; 574if (hwnd != IntPtr.Zero) 769if (hwnd != IntPtr.Zero) 816IntPtr hwnd = IntPtr.Zero; 909if (hwnd != IntPtr.Zero) 1027if (hwnd != IntPtr.Zero) 1101if (hwnd != IntPtr.Zero) 1278if (hkl == IntPtr.Zero) 1333if (DefaultImc != IntPtr.Zero) 1343UnsafeNativeMethods.ImmAssociateContext(new HandleRef(this, hwnd), new HandleRef(this, IntPtr.Zero)); 1402if (hwnd != IntPtr.Zero) 1522UnsafeNativeMethods.ImmConfigureIME(new HandleRef(this, hkl), new HandleRef(this, HwndFromInputElement(element)), NativeMethods.IME_CONFIG_GENERAL, IntPtr.Zero); 1742IntPtr hwnd = UnsafeNativeMethods.ImmGetDefaultIMEWnd(new HandleRef(this, IntPtr.Zero));
System\Windows\Input\MouseDevice.cs (6)
891IntPtr.Zero) 1283IntPtr.Zero); 1363IntPtr extraInformation = clearExtraInformation ? IntPtr.Zero : rawMouseInputReport.ExtraInformation; 2104IntPtr hwndHit = IntPtr.Zero ; 2113hwndHit = IntPtr.Zero; 2116if (hwndHit != IntPtr.Zero)
System\Windows\Input\Stylus\Pointer\PointerInteractionEngine.cs (5)
85private IntPtr _interactionContext = IntPtr.Zero; 161IntPtr interactionContext = IntPtr.Zero; 170if (_interactionContext != IntPtr.Zero) 208if (_interactionContext != IntPtr.Zero) 211_interactionContext = IntPtr.Zero;
System\Windows\Input\Stylus\Pointer\PointerLogic.cs (1)
263IntPtr.Zero);
System\Windows\Input\Stylus\Wisp\PenContexts.cs (1)
16if(hwndSource == null || IntPtr.Zero == (hwndSource).Handle)
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (2)
1035Debug.Assert(pc != null && pc.CommHandle != IntPtr.Zero); 1089Debug.Assert(pc != null && pc.CommHandle != IntPtr.Zero);
System\Windows\Input\Stylus\Wisp\WispLogic.cs (9)
570IntPtr.Zero); 647IntPtr hwnd = hwndSource != null ? hwndSource.Handle : IntPtr.Zero; 652if (hwnd != IntPtr.Zero && 654UnsafeNativeMethods.GetParent(new HandleRef(this, hwnd)) == IntPtr.Zero && 1298IntPtr.Zero); 1768actions, (int)pt.X, (int)pt.Y, 0, IntPtr.Zero); 2861IntPtr.Zero); 2945IntPtr hwndHit = IntPtr.Zero; 2953if (hwndHit != IntPtr.Zero)
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (2)
1542if (hwndHit != IntPtr.Zero) 1692(int)pt.X, (int)pt.Y, 0, IntPtr.Zero);
System\Windows\InterOp\D3DImage.cs (3)
142if (backBuffer != IntPtr.Zero && backBuffer == _pUserSurfaceUnsafe) 153if (backBuffer != IntPtr.Zero) 643img._pUserSurfaceUnsafe = IntPtr.Zero;
System\Windows\InterOp\HwndAppCommandInputProvider.cs (2)
40return IntPtr.Zero; 59return handled ? new IntPtr(1) : IntPtr.Zero ;
System\Windows\InterOp\HwndKeyboardInputProvider.cs (10)
60_restoreFocusWindow = IntPtr.Zero; 105result = focus != IntPtr.Zero; 156IntPtr result = IntPtr.Zero ; 344if (_restoreFocusWindow == IntPtr.Zero) 459if (_restoreFocusWindow != IntPtr.Zero) 462_restoreFocusWindow = IntPtr.Zero; 734if(hwnd != IntPtr.Zero) 770while (hwnd != IntPtr.Zero) 791return IntPtr.Zero; 830IntPtr extraInformation = IntPtr.Zero;
System\Windows\InterOp\HwndMouseInputProvider.cs (8)
316IntPtr result = IntPtr.Zero ; 741if(lParam != IntPtr.Zero || // someone else took capture 905if(hwndToCheck == IntPtr.Zero) 933hwndToCheck = IntPtr.Zero; 936if(hwndToCheck != IntPtr.Zero) 953hwndToCheck = IntPtr.Zero; 1180if(hwnd != IntPtr.Zero) 1401IntPtr extraInformation = IntPtr.Zero;
System\Windows\InterOp\HwndPanningFeedback.cs (1)
47if (handle != IntPtr.Zero)
System\Windows\InterOp\HwndPointerInputProvider.cs (1)
439return IntPtr.Zero;
System\Windows\InterOp\HwndSource.cs (17)
330if (_hwndWrapper.Handle != IntPtr.Zero) 671if (hwnd == IntPtr.Zero) 744UnsafeNativeMethods.HideCaret(new HandleRef(this, IntPtr.Zero)); 770UnsafeNativeMethods.ShowCaret(new HandleRef(this, IntPtr.Zero)); 833UnsafeNativeMethods.SetWindowPos(new HandleRef(this,_hwndWrapper.Handle), new HandleRef(null,IntPtr.Zero), 923return IntPtr.Zero; 947return _hwndWrapper.Handle == IntPtr.Zero ; 1157IntPtr result = IntPtr.Zero ; 1165if (result != IntPtr.Zero) 1177IntPtr result = IntPtr.Zero ; 1257if(wParam == IntPtr.Zero) 1270result = IntPtr.Zero; 1315result = IntPtr.Zero; 1525IntPtr hwndRoot = IntPtr.Zero; 1541IntPtr result = IntPtr.Zero ; 1622IntPtr result = IntPtr.Zero ; 2572if (_hwndWrapper.Handle != IntPtr.Zero && _registeredDropTargetCount > 0)
System\Windows\InterOp\HwndStylusInputProvider.cs (1)
70IntPtr result = IntPtr.Zero ;
System\Windows\InterOp\HwndTarget.cs (31)
98private static readonly IntPtr Unhandled = IntPtr.Zero; 473Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero); 484IntPtr hwndParent = IntPtr.Zero; 500if (hwndParent != IntPtr.Zero) 504} while (hwndParent != IntPtr.Zero); 507Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero); 956UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true); 1003UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1103UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1120bool enableRenderTarget = (wparam != IntPtr.Zero); 1244UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1281UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1315UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true); 1337UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true); 1373&& !UnsafeNativeMethods.GetLayeredWindowAttributes(_hWnd.MakeHandleRef(this), IntPtr.Zero, IntPtr.Zero, IntPtr.Zero) 1439return IntPtr.Zero; 1445return IntPtr.Zero; 1753new HandleRef(null, IntPtr.Zero), // HWND_TOP 1775new HandleRef(null, IntPtr.Zero), // HWND_TOP 1780UnsafeNativeMethods.InvalidateRect(new HandleRef(this, _hWnd), IntPtr.Zero, true); 1895if(hwndParent != IntPtr.Zero) 2200UnsafeNativeMethods.UpdateLayeredWindow(_hWnd.h, IntPtr.Zero, null, null, IntPtr.Zero, null, 0, ref blend, NativeMethods.ULW_ALPHA); 2279UnsafeNativeMethods.PostMessage(new HandleRef(this, _hWnd), s_updateWindowSettings, IntPtr.Zero, IntPtr.Zero); 2547IntPtr.Zero, 2560if (_hPowerNotify != IntPtr.Zero) 2563_hPowerNotify = IntPtr.Zero; 2605IntPtr retInt = IntPtr.Zero;
System\Windows\InterOp\Imaging.cs (3)
52if (bitmap == IntPtr.Zero) 75if (icon == IntPtr.Zero) 104if (section == IntPtr.Zero)
System\Windows\Media\ChannelManager.cs (3)
99if (_pSyncConnection != IntPtr.Zero) 102_pSyncConnection = IntPtr.Zero; 113if (_pSyncConnection == IntPtr.Zero)
System\Windows\Media\ColorContext.cs (2)
547HRESULT.Check(UnsafeNativeMethodsMilCoreApi.Mscms.GetStandardColorSpaceProfile(IntPtr.Zero, dwProfileID, buffer, out bufferSize)); 565HRESULT.Check(UnsafeNativeMethodsMilCoreApi.Mscms.GetColorDirectory(IntPtr.Zero, buffer, out bufferSize));
System\Windows\Media\EventProxy.cs (2)
29Debug.Assert(((IntPtr)pEPD.m_handle) != IntPtr.Zero, "If this asserts fires: Why is it firing? It might be legal in future."); 104Debug.Assert(((IntPtr)epd.m_handle) != IntPtr.Zero, "Stream is disposed.");
System\Windows\Media\FactoryMaker.cs (7)
25if (s_pFactory == IntPtr.Zero) 73if (s_pImagingFactory != IntPtr.Zero) 78s_pFactory = IntPtr.Zero; 79s_pImagingFactory = IntPtr.Zero; 100Debug.Assert(s_pFactory != IntPtr.Zero); 109if (s_pImagingFactory == IntPtr.Zero) 116Debug.Assert(s_pImagingFactory != IntPtr.Zero);
System\Windows\Media\ImageSourceConverter.cs (1)
219if (addr == IntPtr.Zero)
System\Windows\Media\Imaging\BitmapDecoder.cs (15)
566IntPtr /* IWICBitmapSource */ thumbnail = IntPtr.Zero; 581if (thumbnail != IntPtr.Zero) 627IntPtr /* IWICMetadataQueryReader */ metadata = IntPtr.Zero; 641if (metadata != IntPtr.Zero) 720IntPtr /* IWICBitmapSource */ preview = IntPtr.Zero; 735if (preview != IntPtr.Zero) 999IntPtr decoder = IntPtr.Zero; 1097IntPtr comStream = IntPtr.Zero; 1162Debug.Assert(decoder != IntPtr.Zero); 1496IntPtr comStream = IntPtr.Zero; 1504IntPtr bufferPtr = IntPtr.Zero; 1513if (bufferPtr != IntPtr.Zero) 1522if (comStream == IntPtr.Zero) 1534if (memoryStream != IntPtr.Zero) 1549if (comStream == IntPtr.Zero)
System\Windows\Media\Imaging\BitmapDownload.cs (1)
131hTemplateFile: IntPtr.Zero
System\Windows\Media\Imaging\BitmapEncoder.cs (2)
34pstrName = IntPtr.Zero; 341IntPtr comStream = IntPtr.Zero;
System\Windows\Media\Imaging\BitmapFrameDecode.cs (5)
565IntPtr /* IWICBitmapSource */ thumbnail = IntPtr.Zero; 583if (thumbnail != IntPtr.Zero) 626IntPtr /* IWICMetadataQueryReader */ metadata = IntPtr.Zero; 642if (metadata != IntPtr.Zero) 690IntPtr frameDecode = IntPtr.Zero;
System\Windows\Media\Imaging\BitmapMetadata.cs (29)
150IntPtr pIMetadataWriter = IntPtr.Zero; 162pIMetadataWriter = IntPtr.Zero; 168if (pIMetadataWriter != IntPtr.Zero) 208pIMetadataReader = IntPtr.Zero; 248Invariant.Assert(pIBlockReader != IntPtr.Zero); 270IntPtr pIMetadataWriter = IntPtr.Zero; 299pIMetadataWriter = IntPtr.Zero; 306if (pIMetadataWriter != IntPtr.Zero) 332pIMetadataWriter = IntPtr.Zero; 353if (pIMetadataWriter == IntPtr.Zero) 386if (pIMetadataWriter == IntPtr.Zero) 503rgelt = IntPtr.Zero; 510rgelt = IntPtr.Zero; 566ppEnum = IntPtr.Zero; 638IntPtr /* IWICMetadataQueryWriter */ queryWriter = IntPtr.Zero; 673IntPtr /* IWICMetadataBlockWriter */ blockWriter = IntPtr.Zero; 674IntPtr /* IWICMetadataQueryWriter */ queryWriter = IntPtr.Zero; 697queryWriter = IntPtr.Zero; 703if (blockWriter != IntPtr.Zero) 708if (queryWriter != IntPtr.Zero) 722IntPtr /* IWICMetadataBlockWriter */ blockWriter = IntPtr.Zero; 723IntPtr /* IWICMetadataQueryWriter */ queryWriter = IntPtr.Zero; 746queryWriter = IntPtr.Zero; 752if (blockWriter != IntPtr.Zero) 757if (queryWriter != IntPtr.Zero) 772IntPtr queryWriter = IntPtr.Zero; 798queryWriter = IntPtr.Zero; 809if (queryWriter != IntPtr.Zero) 1190IntPtr.Zero
System\Windows\Media\Imaging\BitmapMetadataEnumerator.cs (3)
56IntPtr ppStr = IntPtr.Zero; 87if (ppStr != IntPtr.Zero) 90ppStr = IntPtr.Zero;
System\Windows\Media\Imaging\BitmapSource.cs (5)
582IntPtr wicSource = IntPtr.Zero; 683if (buffer == IntPtr.Zero) 834new SafeMILHandle(IntPtr.Zero), 1775if (pvPixels == IntPtr.Zero) 1785if (prc == IntPtr.Zero)
System\Windows\Media\Imaging\BitmapSourceSafeMILHandle.cs (2)
69if (bitmapObject != IntPtr.Zero) 86Debug.Assert(wicBitmap != IntPtr.Zero);
System\Windows\Media\Imaging\BitmapVisualManager.cs (1)
95IntPtr pIRenderTargetBitmap = IntPtr.Zero;
System\Windows\Media\Imaging\PropVariant.cs (15)
126ca.pElems = IntPtr.Zero; 133IntPtr destPtr = IntPtr.Zero; 148destPtr = IntPtr.Zero; 152if (destPtr != IntPtr.Zero) 165ca.pElems = IntPtr.Zero; 171IntPtr destPtr = IntPtr.Zero; 182IntPtr pString = IntPtr.Zero; 201destPtr = IntPtr.Zero; 205if (destPtr != IntPtr.Zero) 399IntPtr punkTemp = IntPtr.Zero; 431if (ca.pElems != IntPtr.Zero) 690IntPtr queryHandle = IntPtr.Zero; 704queryHandle = IntPtr.Zero; 718queryHandle = IntPtr.Zero; 728if (queryHandle != IntPtr.Zero)
System\Windows\Media\Imaging\UnknownBitmapDecoder.cs (1)
27MS.Win32.PresentationCore.UnsafeNativeMethods.WICCodec.CoInitialize(IntPtr.Zero);
System\Windows\Media\Imaging\WriteableBitmap.cs (3)
266if (_backBuffer == IntPtr.Zero) 268IntPtr tempBackBufferPointer = IntPtr.Zero; 826if (sourceBuffer == IntPtr.Zero)
System\Windows\Media\MediaContextNotificationWindow.cs (3)
52hwndNotification = new HwndWrapper(0, NativeMethods.WS_POPUP, 0, 0, 0, 0, 0, "MediaContextNotificationWindow", IntPtr.Zero, null); 154return IntPtr.Zero; 184if (functionAddress != IntPtr.Zero)
System\Windows\Media\MediaSystem.cs (1)
237s_pConnection = IntPtr.Zero;
System\Windows\Media\PixelFormat.cs (7)
337Debug.Assert(pixelFormatInfo != IntPtr.Zero); 377if (pixelFormatInfo != IntPtr.Zero) 389IntPtr componentInfo = IntPtr.Zero; 390IntPtr pixelFormatInfo = IntPtr.Zero; 417if (componentInfo != IntPtr.Zero) 436Debug.Assert(pixelFormatInfo != IntPtr.Zero); 447if (pixelFormatInfo != IntPtr.Zero)
System\Windows\Media\SafeReversePInvokeHandle.cs (1)
43if (handle != IntPtr.Zero)
System\Windows\Media\StreamAsIStream.cs (10)
53Debug.Assert(((IntPtr)pSD.m_handle) != IntPtr.Zero, "If this asserts fires: why is it firing. It might be legal in future."); 155stream = IntPtr.Zero; 509Debug.Assert(((IntPtr)sd.m_handle) != IntPtr.Zero, "Stream is disposed."); 585IntPtr pIStream = IntPtr.Zero; 591return IntPtr.Zero; 598return IntPtr.Zero; 607IntPtr pIStream = IntPtr.Zero; 613return IntPtr.Zero; 620return IntPtr.Zero; 632IntPtr pStream = IntPtr.Zero;
System\Windows\Media\textformatting\TextFormatterContext.cs (14)
32_ploc = IntPtr.Zero; 39if(_ploc == System.IntPtr.Zero) 52contextInfo.pols = IntPtr.Zero; // This will be filled in the un-managed code 110IntPtr ploc = IntPtr.Zero; 111IntPtr ppenaltyModule = IntPtr.Zero; 165Invariant.Assert(_ploc != System.IntPtr.Zero); 241if(_ploc != System.IntPtr.Zero) 244_ploc = IntPtr.Zero; 256Invariant.Assert(_ploc != System.IntPtr.Zero); 286Invariant.Assert(_ploc != System.IntPtr.Zero); 312Invariant.Assert(_ploc != System.IntPtr.Zero); 334Invariant.Assert(_ploc != System.IntPtr.Zero); 353Invariant.Assert(_ploc != System.IntPtr.Zero); 373Invariant.Assert(_ploc != System.IntPtr.Zero);
System\Windows\Media\textformatting\TextLineBreak.cs (5)
34if (breakRecord == IntPtr.Zero) 69IntPtr pbreakrec = IntPtr.Zero; 71if (_breakRecord != IntPtr.Zero) 92if (_breakRecord != IntPtr.Zero) 96_breakRecord = IntPtr.Zero;
System\Windows\Media\textformatting\TextParagraphCache.cs (5)
48TextFormatterContext context = settings.Formatter.AcquireContext(_fullText, IntPtr.Zero); 52IntPtr ploparabreakValue = IntPtr.Zero; 59IntPtr.Zero, 148if(_ploparabreak != IntPtr.Zero) 152_ploparabreak = IntPtr.Zero;
System\Windows\Media\UnsafeNativeMethodsMilCoreApi.cs (2)
519if (ptr != IntPtr.Zero) 523ptr = IntPtr.Zero;
System\Windows\UIElement.cs (2)
1134HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 1140if (dc == IntPtr.Zero)
PresentationFramework (702)
Microsoft\Win32\CommonDialog.cs (8)
67if (hwndOwner == IntPtr.Zero) 83if (hwndOwner == IntPtr.Zero) 85tempParentHwnd = new HwndWrapper(0, 0, 0, 0, 0, 0, 0, "", IntPtr.Zero, null); 137if (hwndOwner == IntPtr.Zero) 215return IntPtr.Zero; 254IntPtr hMonitor = IntPtr.Zero; 257if (_hwndOwnerWindow != IntPtr.Zero) 271if (hMonitor != IntPtr.Zero)
MS\Internal\AppModel\AppSecurityManager.cs (1)
93UnsafeNativeMethods.ShellExecute(new HandleRef(null, IntPtr.Zero), /*hwnd*/
MS\Internal\AppModel\IconHelper.cs (3)
217IntPtr bits = IntPtr.Zero; 219new HandleRef(null, IntPtr.Zero), // A device context. Pass null in if no DIB_PAL_COLORS is used. 227if (colorBitmap.IsInvalid || bits == IntPtr.Zero)
MS\Internal\AppModel\ShellProvider.cs (1)
955HRESULT hr = NativeMethods2.SHGetFolderPathEx(ref knownFolder, 0, IntPtr.Zero, pathBuilder, (uint)pathBuilder.Capacity);
MS\Internal\Controls\ActiveXHelper.cs (2)
87if (hDC != IntPtr.Zero) 106if (hDC != IntPtr.Zero)
MS\Internal\Controls\ActiveXSite.cs (2)
173if (hwnd != IntPtr.Zero) 261lpFrameInfo.hAccel = IntPtr.Zero;
MS\Internal\Controls\EnumUnknown.cs (2)
39if (pceltFetched != IntPtr.Zero) 65if (pceltFetched != IntPtr.Zero)
MS\Internal\Documents\DocumentViewerHelper.cs (1)
283IntPtr hwnd = (hwndSource != null) ? hwndSource.Handle : IntPtr.Zero;
MS\Internal\IO\Packaging\indexingfiltermarshaler.cs (5)
178IntPtr pszVal = IntPtr.Zero; 179IntPtr pNative = IntPtr.Zero; 215Invariant.Assert(pNative != IntPtr.Zero); 222if (pszVal != IntPtr.Zero) 227if (pNative != IntPtr.Zero)
MS\Internal\IO\Packaging\ManagedIStream.cs (3)
44if (bytesReadPtr != IntPtr.Zero) 83if (newPositionPtr != IntPtr.Zero) 146if (bytesWrittenPtr != IntPtr.Zero)
MS\Internal\IO\Packaging\XpsFilter.cs (1)
109if (pBuffer == IntPtr.Zero)
MS\Internal\Printing\NativeMethods.cs (18)
29public IntPtr hwndOwner = IntPtr.Zero; 30public IntPtr hDevMode = IntPtr.Zero; 31public IntPtr hDevNames = IntPtr.Zero; 32public IntPtr hDC = IntPtr.Zero; 38public IntPtr lpPageRanges = IntPtr.Zero; 42public IntPtr hInstance = IntPtr.Zero; 43public IntPtr lpPrintTemplateName = IntPtr.Zero; 44public IntPtr lpCallback = IntPtr.Zero; 46public IntPtr lphPropertyPages = IntPtr.Zero; 55public IntPtr hwndOwner = IntPtr.Zero; 56public IntPtr hDevMode = IntPtr.Zero; 57public IntPtr hDevNames = IntPtr.Zero; 58public IntPtr hDC = IntPtr.Zero; 64public IntPtr lpPageRanges = IntPtr.Zero; 68public IntPtr hInstance = IntPtr.Zero; 69public IntPtr lpPrintTemplateName = IntPtr.Zero; 70public IntPtr lpCallback = IntPtr.Zero; 72public IntPtr lphPropertyPages = IntPtr.Zero;
MS\Internal\Printing\PrintDlgExMarshaler.cs (27)
45_unmanagedPrintDlgEx = IntPtr.Zero; 87if (_unmanagedPrintDlgEx == IntPtr.Zero) 150if (_unmanagedPrintDlgEx != IntPtr.Zero) 158if (_ownerHandle == IntPtr.Zero) 187if (_unmanagedPrintDlgEx != IntPtr.Zero) 190_unmanagedPrintDlgEx = IntPtr.Zero; 227IntPtr devNamesHandle = IntPtr.Zero; 228IntPtr pageRangePtr = IntPtr.Zero; 255(pageRangePtr != IntPtr.Zero)) 269if (devNamesHandle != IntPtr.Zero) 271IntPtr pDevNames = IntPtr.Zero; 282if (pDevNames != IntPtr.Zero) 364IntPtr pDevMode = IntPtr.Zero; 375if (pDevMode != IntPtr.Zero) 441IntPtr unmanagedBuffer = IntPtr.Zero; 506pdex.lpPageRanges = IntPtr.Zero; 585pdex.lpPageRanges = IntPtr.Zero; 615if (unmanagedBuffer != IntPtr.Zero) 618unmanagedBuffer = IntPtr.Zero; 641if (unmanagedBuffer == IntPtr.Zero) 646IntPtr devModeHandle = IntPtr.Zero; 647IntPtr devNamesHandle = IntPtr.Zero; 648IntPtr pageRangePtr = IntPtr.Zero; 668if (devModeHandle != IntPtr.Zero) 673if (devNamesHandle != IntPtr.Zero) 678if (pageRangePtr != IntPtr.Zero) 714IntPtr hDevNames = IntPtr.Zero;
MS\Internal\Printing\Win32PrintDialog.cs (2)
57IntPtr owner = IntPtr.Zero; 118if (owner == IntPtr.Zero)
MS\Internal\PtsHost\BaseParaClient.cs (2)
38_paraHandle = IntPtr.Zero; 64Debug.Assert(_paraHandle == IntPtr.Zero || _paraHandle == pfspara);
MS\Internal\PtsHost\CellParaClient.cs (10)
117if(_paraHandle != IntPtr.Zero) 154if(CellParagraph.StructuralCache.DtrList != null && breakRecordIn != IntPtr.Zero) 173bool suppressTopSpace = (breakRecordIn != IntPtr.Zero) ? true : false; 177IntPtr.Zero, 194if (pmcsclientOut != IntPtr.Zero) 200pmcsclientOut = IntPtr.Zero; 244if (pmcsclientOut != IntPtr.Zero) 250pmcsclientOut = IntPtr.Zero; 291if (pmcsclientOut != IntPtr.Zero) 297pmcsclientOut = IntPtr.Zero;
MS\Internal\PtsHost\CellParagraph.cs (4)
94ppfscell = IntPtr.Zero; 103if (pfsbrkcellOut != IntPtr.Zero) 106pfsbrkcellOut = IntPtr.Zero; 109ppfscell = IntPtr.Zero;
MS\Internal\PtsHost\ContainerParagraph.cs (23)
159firstParaName = (_firstChild != null) ? _firstChild.Handle : IntPtr.Zero; 255nextParaName = IntPtr.Zero; 314nmpBeforeChange = IntPtr.Zero; 474if (mcs != null && pbrkrecIn != IntPtr.Zero) 507if (pbrkrecIn == IntPtr.Zero) 528(mcsContainer != null) ? mcsContainer.Handle : IntPtr.Zero, fskclearIn, 558if (pmcsclientOut != IntPtr.Zero) 562pmcsclientOut = IntPtr.Zero; 573pmcsclientOut = (mcsNew != null) ? mcsNew.Handle : IntPtr.Zero; 596paraClient.SetChunkInfo(pbrkrecIn == IntPtr.Zero, pbrkrecOut == IntPtr.Zero); 666(mcsContainer != null) ? mcsContainer.Handle : IntPtr.Zero, fskclearIn, fInterruptable, 682if (pmcsclientOut != IntPtr.Zero) 686pmcsclientOut = IntPtr.Zero; 691pmcsclientOut = (mcsNew != null) ? mcsNew.Handle : IntPtr.Zero; 704Debug.Assert(pmcsclientOut == IntPtr.Zero); 705pfspara = IntPtr.Zero; 790(mcsContainer != null) ? mcsContainer.Handle : IntPtr.Zero, fskclearIn, fInterruptable, 806if (pmcsclientOut != IntPtr.Zero) 810pmcsclientOut = IntPtr.Zero; 815pmcsclientOut = (mcsNew != null) ? mcsNew.Handle : IntPtr.Zero; 828Debug.Assert(pmcsclientOut == IntPtr.Zero); 829pfspara = IntPtr.Zero;
MS\Internal\PtsHost\FigureParaClient.cs (2)
40if (SubpageHandle != IntPtr.Zero) 43SubpageHandle = IntPtr.Zero;
MS\Internal\PtsHost\FigureParagraph.cs (11)
168CreateSubpageFiniteHelper(PtsContext, IntPtr.Zero, PTS.False, _mainTextSegment.Handle, IntPtr.Zero, PTS.False, PTS.True, 174if(brParaOut != IntPtr.Zero) 191if (pfsFigureContent != IntPtr.Zero) 195if (pmcsclientOut != IntPtr.Zero) 200pmcsclientOut = IntPtr.Zero; 211CreateSubpageFiniteHelper(PtsContext, IntPtr.Zero, PTS.False, _mainTextSegment.Handle, IntPtr.Zero, PTS.False, PTS.True, 217if(brParaOut != IntPtr.Zero) 235if (pmcsclientOut != IntPtr.Zero) 240pmcsclientOut = IntPtr.Zero;
MS\Internal\PtsHost\FloaterParagraph.cs (27)
191pbrkrecOut = IntPtr.Zero; 192pfsFloatContent = IntPtr.Zero; 246Debug.Assert(pmcsclientOut == IntPtr.Zero); 265if (pfsFloatContent != IntPtr.Zero) 268pfsFloatContent = IntPtr.Zero; 270if (pbrkrecOut != IntPtr.Zero) 273pbrkrecOut = IntPtr.Zero; 275if (pmcsclientOut != IntPtr.Zero) 280pmcsclientOut = IntPtr.Zero; 300if (pmcsclientOut != IntPtr.Zero) 305pmcsclientOut = IntPtr.Zero; 333if (pfsFloatContent != IntPtr.Zero) 336pfsFloatContent = IntPtr.Zero; 338if (pbrkrecOut != IntPtr.Zero) 341pbrkrecOut = IntPtr.Zero; 401pfsFloatContent = IntPtr.Zero; 443if (pfsFloatContent != IntPtr.Zero) 447if (pmcsclientOut != IntPtr.Zero) 452pmcsclientOut = IntPtr.Zero; 470if (pmcsclientOut != IntPtr.Zero) 475pmcsclientOut = IntPtr.Zero; 491if (pfsFloatContent != IntPtr.Zero) 496Debug.Assert(pmcsclientOut == IntPtr.Zero); 498pfsFloatContent = IntPtr.Zero; 515Debug.Assert(pmcsclientOut == IntPtr.Zero); 518pfsFloatContent = IntPtr.Zero; 566pmcsclientOut = IntPtr.Zero;
MS\Internal\PtsHost\FlowDocumentPage.cs (2)
422if (_ptsPage.PageHandle == IntPtr.Zero) 491if (columnDesc.pfstrack != IntPtr.Zero)
MS\Internal\PtsHost\PageBreakRecord.cs (2)
35Invariant.Assert(br != IntPtr.Zero, "Invalid break record object."); 150_br = IntPtr.Zero;
MS\Internal\PtsHost\PtsCache.cs (8)
329Invariant.Assert(_contextPool[index].PtsHost.Context != IntPtr.Zero, "PTS Context handle is not valid."); 331Invariant.Assert(_contextPool[index].InstalledObjects != IntPtr.Zero, "Installed Objects handle is not valid."); 401Invariant.Assert(_contextPool[index].PtsHost.Context != IntPtr.Zero, "PTS Context handle is not valid."); 403Invariant.Assert(_contextPool[index].InstalledObjects != IntPtr.Zero, "Installed Objects handle is not valid."); 617subtrackParaInfo.pfnGetFootnoteInfoWord = IntPtr.Zero; 680tableobjInit.tableobjcbk.pfnGetDvrUsedForFloatTable = IntPtr.Zero; 710tableobjInit.tablecbkcell.pfnGetCellFootnoteInfo = IntPtr.Zero; 711tableobjInit.tablecbkcell.pfnGetCellFootnoteInfoWord = IntPtr.Zero;
MS\Internal\PtsHost\PtsContext.cs (8)
84Invariant.Assert(((IntPtr)_pageBreakRecords[index]) != IntPtr.Zero, "Invalid break record object"); 102Invariant.Assert(((IntPtr)_pages[index]) != IntPtr.Zero, "Invalid break record object"); 283Invariant.Assert(ptsPage != IntPtr.Zero, "Invalid page object."); 298Invariant.Assert(ptsPage != IntPtr.Zero, "Invalid page object."); 324Invariant.Assert(br != IntPtr.Zero, "Invalid break record object."); 338Invariant.Assert(br != IntPtr.Zero, "Invalid break record object."); 473Invariant.Assert(ptsPage != IntPtr.Zero, "Invalid page object."); 510Invariant.Assert(br != IntPtr.Zero, "Invalid break record object.");
MS\Internal\PtsHost\PtsHelper.cs (5)
123if (trackDesc.pfstrack != IntPtr.Zero) 213bool emptyTrack = (trackDesc.pfstrack == IntPtr.Zero); 316if (trackDesc.pfstrack != IntPtr.Zero) 373if (trackDesc.pfstrack == IntPtr.Zero) { return null; } 448if (trackDesc.pfstrack == IntPtr.Zero)
MS\Internal\PtsHost\PtsHost.cs (97)
36_context = IntPtr.Zero; 63get { Invariant.Assert(_context != IntPtr.Zero); return _context; } 64set { Invariant.Assert(_context == IntPtr.Zero); _context = value; } 327fSuccess = 0; nmsNext = IntPtr.Zero; 333fSuccess = 0; nmsNext = IntPtr.Zero; 422nmSegment = IntPtr.Zero; 428nmSegment = IntPtr.Zero; 457fHeaderPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirHeader = 0; nmsHeader = IntPtr.Zero; 463fHeaderPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirHeader = 0; nmsHeader = IntPtr.Zero; 492fFooterPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirFooter = 0; nmsFooter = IntPtr.Zero; 498fFooterPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirFooter = 0; nmsFooter = IntPtr.Zero; 601fSuccessful = 0; nmp = IntPtr.Zero; 607fSuccessful = 0; nmp = IntPtr.Zero; 631fFound = 0; nmpNext = IntPtr.Zero; 637fFound = 0; nmpNext = IntPtr.Zero; 659fFound = fChangeFirst = 0; nmpBeforeChange = IntPtr.Zero; 665fFound = fChangeFirst = 0; nmpBeforeChange = IntPtr.Zero; 738pfsparaclient = IntPtr.Zero; 744pfsparaclient = IntPtr.Zero; 825nmsEndnoteSeparator = nmsEndnoteContSeparator = nmsEndnoteContNotice = IntPtr.Zero; 831nmsEndnoteSeparator = nmsEndnoteContSeparator = nmsEndnoteContNotice = IntPtr.Zero; 852fEndnotesPresent = 0; nmsEndnotes = IntPtr.Zero; 858fEndnotesPresent = 0; nmsEndnotes = IntPtr.Zero; 893nmsFtnSeparator = nmsFtnContSeparator = nmsFtnContNotice = IntPtr.Zero; 932nmsFootnote = IntPtr.Zero; 975pmcsclientNew = IntPtr.Zero; 981pmcsclientNew = IntPtr.Zero; 1017if (pmcsclient1 == IntPtr.Zero || pmcsclient2 == IntPtr.Zero) 1063if (pmcsclient != IntPtr.Zero) 1102pObjectInfo = IntPtr.Zero; 1144if(pfsbreakreclineclient != IntPtr.Zero) 1160ppfsparabreakingsession = IntPtr.Zero; 1168ppfsparabreakingsession = IntPtr.Zero; 1272pfsdropc = IntPtr.Zero; 1324pmcsclientOut = IntPtr.Zero; 1329pmcsclientOut = IntPtr.Zero; 1335pmcsclientOut = IntPtr.Zero; 1387pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1394pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1446pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = 0; 1453pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = 0; 1489if(pbrlineIn != IntPtr.Zero) 1541rgfslinevariant[breakIndex].pfsbreakreclineclient = IntPtr.Zero; 1626pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1633pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1663pbrlineDup = IntPtr.Zero; 1669pbrlineDup = IntPtr.Zero; 1869pmcsclientAfterPara = IntPtr.Zero; 2252fsfmtr = new PTS.FSFMTR(); pfsFloatContent = pbrkrecpara = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2258fsfmtr = new PTS.FSFMTR(); pfsFloatContent = pbrkrecpara = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2295pfsFloatContent = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2302pfsFloatContent = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2583if (pmcsclientIn != IntPtr.Zero) 2592pmcsclientOut = IntPtr.Zero; 2598pmcsclientOut = IntPtr.Zero; 2619if (pmcsclientIn != IntPtr.Zero) 2700if (pmcsclientIn != IntPtr.Zero) 2711fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 2718fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 2757if (pmcsclientIn != IntPtr.Zero) 2768pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2776pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2814if (pmcsclientIn != IntPtr.Zero) 2826pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2834pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3015if (pmcsclientIn != IntPtr.Zero) 3026fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 3033fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 3071if (pmcsclientIn != IntPtr.Zero) 3083pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3091pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3129if (pmcsclientIn != IntPtr.Zero) 3141pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3149pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3368ppmcsclientOut = IntPtr.Zero; 3374ppmcsclientOut = IntPtr.Zero; 3398pnmFirstHeaderRow = IntPtr.Zero; 3405pnmFirstHeaderRow = IntPtr.Zero; 3430pnmNextHeaderRow = IntPtr.Zero; 3437pnmNextHeaderRow = IntPtr.Zero; 3461pnmFirstFooterRow = IntPtr.Zero; 3468pnmFirstFooterRow = IntPtr.Zero; 3493pnmNextFooterRow = IntPtr.Zero; 3500pnmNextFooterRow = IntPtr.Zero; 3523pnmFirstRow = IntPtr.Zero; 3530pnmFirstRow = IntPtr.Zero; 3554pnmNextRow = IntPtr.Zero; 3561pnmNextRow = IntPtr.Zero; 3629pnmRowBeforeChange = IntPtr.Zero; 3637pnmRowBeforeChange = IntPtr.Zero; 3893ppfscell = IntPtr.Zero; 3894pfsbrkcellOut = IntPtr.Zero; 3902ppfscell = IntPtr.Zero; 3903pfsbrkcellOut = IntPtr.Zero; 3938ppfscell = IntPtr.Zero; 3946ppfscell = IntPtr.Zero;
MS\Internal\PtsHost\PtsPage.cs (12)
48_ptsPage = IntPtr.Zero; 299_ptsPage = IntPtr.Zero; 391IntPtr brIn = (breakRecord != null) ? breakRecord.BreakRecord : IntPtr.Zero; 401_ptsPage = IntPtr.Zero; 402brOut = IntPtr.Zero; 409if (brOut != IntPtr.Zero) 452IntPtr brIn = (breakRecord != null) ? breakRecord.BreakRecord : IntPtr.Zero; 468if (brOut != IntPtr.Zero) 721_ptsPage = IntPtr.Zero; 1430if (_ptsPage != IntPtr.Zero) 1433_ptsPage = IntPtr.Zero; 1451return (_ptsPage == IntPtr.Zero);
MS\Internal\PtsHost\RowParagraph.cs (2)
83paraClientHandle = IntPtr.Zero; 199if(rgpfsCell[index] != IntPtr.Zero)
MS\Internal\PtsHost\Section.cs (7)
176nmsNext = IntPtr.Zero; 286nmsHeader = IntPtr.Zero; 330nmsFooter = IntPtr.Zero; 380nmsEndnotes = IntPtr.Zero; 400nmsEndnoteSeparator = IntPtr.Zero; 401nmsEndnoteContSeparator = IntPtr.Zero; 402nmsEndnoteContNotice = IntPtr.Zero;
MS\Internal\PtsHost\SubpageParaClient.cs (2)
46if (_paraHandle != IntPtr.Zero) 49_paraHandle = IntPtr.Zero;
MS\Internal\PtsHost\SubpageParagraph.cs (19)
133if (mcs != null && pbrkrecIn != IntPtr.Zero) 163if (pbrkrecIn == IntPtr.Zero) 226if (pbrkrecIn == IntPtr.Zero) // if first chunk 233if (pmcsclientOut != IntPtr.Zero) 237pmcsclientOut = IntPtr.Zero; 257pmcsclientOut = (mcsBottom != null) ? mcsBottom.Handle : IntPtr.Zero; 259if (pmcsclientOut == IntPtr.Zero) // if last chunk 283paraClient.SetChunkInfo(pbrkrecIn == IntPtr.Zero, pbrkrecOut == IntPtr.Zero); 392if (pmcsclientOut != IntPtr.Zero) 396pmcsclientOut = IntPtr.Zero; 399pmcsclientOut = (mcsBottom != null) ? mcsBottom.Handle : IntPtr.Zero; 426Debug.Assert(pmcsclientOut == IntPtr.Zero); 427pfspara = IntPtr.Zero; 547if (pmcsclientOut != IntPtr.Zero) 551pmcsclientOut = IntPtr.Zero; 554pmcsclientOut = (mcsBottom != null) ? mcsBottom.Handle : IntPtr.Zero; 581Debug.Assert(pmcsclientOut == IntPtr.Zero); 582pfspara = IntPtr.Zero;
MS\Internal\PtsHost\TableParaClient.cs (13)
126if (arrayFsCell[iC] == IntPtr.Zero) 340if (arrayFsCell[iC] == IntPtr.Zero) 388if (arrayFsCell[iC] == IntPtr.Zero) 462if (arrayFsCell[iC] == IntPtr.Zero) 553if (arrayFsCell[iC] == IntPtr.Zero) 629if (arrayFsCell[iC] == IntPtr.Zero) 750if(arrayFsCell[iC] != IntPtr.Zero && 846if (arrayFsCell[iC] == IntPtr.Zero) 913if (arrayFsCell[iC] == IntPtr.Zero) 973if (arrayFsCell[iC] == IntPtr.Zero) 1052if (arrayFsCell[iC] == IntPtr.Zero) 1551arrayFsCell[iC] == IntPtr.Zero 1669if (arrayFsCell[iC] == IntPtr.Zero)
MS\Internal\PtsHost\TableParagraph.cs (9)
171ppmcsclientOut = IntPtr.Zero; 175if (pmcsclientIn != IntPtr.Zero) 197pnmFirstHeaderRow = IntPtr.Zero; 214pnmNextHeaderRow = IntPtr.Zero; 229pnmFirstFooterRow = IntPtr.Zero; 246pnmNextFooterRow = IntPtr.Zero; 287pnmFirstRow = IntPtr.Zero; 362pnmNextRow = IntPtr.Zero; 399pnmRowBeforeChange = IntPtr.Zero;
MS\Internal\PtsHost\TextParaClient.cs (2)
522IntPtr breakRecLine = IntPtr.Zero; 981IntPtr breakRecLine = IntPtr.Zero;
MS\Internal\PtsHost\TextParagraph.cs (4)
253mcsClient = IntPtr.Zero; 546ppbrlineOut = IntPtr.Zero; 727ppbrlineOut = IntPtr.Zero; 1312if(pbrLineIn != IntPtr.Zero)
MS\Internal\PtsHost\UIElementParagraph.cs (6)
191pbrkrecOut = IntPtr.Zero; 192pfsFloatContent = IntPtr.Zero; 233pfsFloatContent = IntPtr.Zero; 251pbrkrecOut = IntPtr.Zero; 289pfsFloatContent = IntPtr.Zero; 369pmcsclientOut = IntPtr.Zero;
MS\Internal\PtsHost\UnmanagedHandle.cs (1)
42_handle = IntPtr.Zero;
MS\Internal\WindowsRuntime\Generated\Windows.Data.Text.cs (19)
39if (thisPtr == IntPtr.Zero) return null; 49public static bool operator ==(AlternateWordForm x, AlternateWordForm y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 72ppv = IntPtr.Zero; 257if (thisPtr == IntPtr.Zero) return null; 267public static bool operator ==(WordSegment x, WordSegment y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 290ppv = IntPtr.Zero; 362if (thisPtr == IntPtr.Zero) return null; 372public static bool operator ==(WordsSegmenter x, WordsSegmenter y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 397ppv = IntPtr.Zero; 423public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 425public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateWordForm obj) => obj is null ? IntPtr.Zero : CreateMarshaler(obj).GetRef(); 1547public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 1549public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegment obj) => obj is null ? IntPtr.Zero : CreateMarshaler(obj).GetRef(); 1625public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegmentsTokenizingHandler managedDelegate) => CreateMarshaler(managedDelegate)?.GetRef() ?? IntPtr.Zero; 1656public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 1658public 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)
134if (thisPtr == IntPtr.Zero) return null; 144public static bool operator ==(Language x, Language y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 177ppv = IntPtr.Zero; 836public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 838public 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)
45if (functionPtr == IntPtr.Zero) 123_moduleHandle = Platform.LoadLibraryExW(System.IO.Path.Combine(_currentModuleDirectory, fileName), IntPtr.Zero, /* LOAD_WITH_ALTERED_SEARCH_PATH */ 8); 125if (_moduleHandle == IntPtr.Zero) 135if (_moduleHandle == IntPtr.Zero) 143if (canUnloadNow != IntPtr.Zero) 164if ((_moduleHandle != IntPtr.Zero) && !Platform.FreeLibrary(_moduleHandle))
MS\Internal\WindowsRuntime\Generated\WinRT\ExceptionHelpers.cs (7)
43IntPtr winRTErrorModule = Platform.LoadLibraryExW("api-ms-win-core-winrt-error-l1-1-1.dll", IntPtr.Zero, (uint)DllImportSearchPath.System32); 44if (winRTErrorModule != IntPtr.Zero) 53winRTErrorModule = Platform.LoadLibraryExW("api-ms-win-core-winrt-error-l1-1-0.dll", IntPtr.Zero, (uint)DllImportSearchPath.System32); 54if (winRTErrorModule != IntPtr.Zero) 98if (restrictedErrorInfoPtr != IntPtr.Zero) 189hstring = IntPtr.Zero; 313if (restrictedErrorInfoPtr != IntPtr.Zero)
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\ExceptionErrorInfo.cs (16)
129source = IntPtr.Zero; 147description = IntPtr.Zero; 165helpFile = IntPtr.Zero; 183helpFileContent = IntPtr.Zero; 227return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 241return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 255return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 269return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 305IntPtr __return_value__ = IntPtr.Zero; 414IntPtr _description = IntPtr.Zero; 415IntPtr _restrictedDescription = IntPtr.Zero; 416IntPtr _capabilitySid = IntPtr.Zero; 420description = _description != IntPtr.Zero ? Marshal.PtrToStringBSTR(_description) : string.Empty; 421restrictedDescription = _restrictedDescription != IntPtr.Zero ? Marshal.PtrToStringBSTR(_restrictedDescription) : string.Empty; 422capabilitySid = _capabilitySid != IntPtr.Zero ? Marshal.PtrToStringBSTR(_capabilitySid) : string.Empty; 438return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty;
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\IContextCallback.cs (1)
77Marshal.ThrowExceptionForHR(_obj.Vftbl.ContextCallback_4(ThisPtr, pfnCallback, pParam, ref riid, iMethod, IntPtr.Zero));
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (31)
66public static IntPtr GetAbi(MarshalString m) => m is null ? IntPtr.Zero : m._handle; 68public static IntPtr GetAbi(object box) => box is null ? IntPtr.Zero : ((MarshalString)box)._handle; 80if (hstring != IntPtr.Zero) 92if (value == IntPtr.Zero) 103return IntPtr.Zero; 122if (_array != IntPtr.Zero) 196return (0, IntPtr.Zero); 198IntPtr data = IntPtr.Zero; 204data = IntPtr.Zero; 305return (0, IntPtr.Zero); 437if (_array != IntPtr.Zero) 506if (abi.data == IntPtr.Zero) 524return (0, IntPtr.Zero); 526IntPtr data = IntPtr.Zero; 532data = IntPtr.Zero; 600if (abi.data == IntPtr.Zero) return; 619if (_array != IntPtr.Zero) 684return (0, IntPtr.Zero); 686IntPtr data = IntPtr.Zero; 692data = IntPtr.Zero; 754if (abi.data == IntPtr.Zero) return; 761return objRef?.ThisPtr ?? IntPtr.Zero; 771if (ptr == IntPtr.Zero) return; 786if (ptr == IntPtr.Zero) 835value is null ? IntPtr.Zero : MarshalInterfaceHelper<T>.GetAbi(value); 845return IntPtr.Zero; 853(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 918objRef is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(objRef); 922if (ptr == IntPtr.Zero) 953return objRef?.GetRef() ?? IntPtr.Zero; 959*(IntPtr*)dest.ToPointer() = objRef?.GetRef() ?? IntPtr.Zero;
MS\Internal\WindowsRuntime\Generated\WinRT\ObjectReference.cs (5)
39if (thisPtr == IntPtr.Zero) 156if (thisPtr == IntPtr.Zero) 161thisPtr = IntPtr.Zero; 184if (thisPtr == IntPtr.Zero) 195if (thisPtr == IntPtr.Zero)
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IEnumerable.cs (8)
41objRef?.ThisPtr ?? IntPtr.Zero; 44thisPtr == IntPtr.Zero ? null : new IEnumerable<T>(ObjRefFromAbi(thisPtr)); 47(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 143if (thisPtr == IntPtr.Zero) 198objRef?.ThisPtr ?? IntPtr.Zero; 201thisPtr == IntPtr.Zero ? null : new IEnumerator<T>(ObjRefFromAbi(thisPtr)); 207(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 548if (thisPtr == IntPtr.Zero)
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (4)
36objRef?.ThisPtr ?? IntPtr.Zero; 39thisPtr == IntPtr.Zero ? null : new IReadOnlyList<T>(ObjRefFromAbi(thisPtr)); 42(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 340if (thisPtr == IntPtr.Zero)
System\Windows\Appearance\WindowBackdropManager.cs (5)
44if (handle == IntPtr.Zero) 56if (hwnd == IntPtr.Zero) 99if (hwnd != IntPtr.Zero) 114if (hwnd != IntPtr.Zero) 117if (windowSource?.Handle != IntPtr.Zero && windowSource.CompositionTarget != null)
System\Windows\Application.cs (5)
1927return IntPtr.Zero; 2071IntPtr.Zero, 2078IntPtr retInt = IntPtr.Zero; 2134refInt = IntPtr.Zero; 2284UnsafeNativeMethods.PlaySound(soundFile, IntPtr.Zero, PLAYSOUND_FLAGS);
System\Windows\Automation\Peers\HwndHostAutomationPeer.cs (1)
39if(hwnd != IntPtr.Zero)
System\Windows\Automation\Peers\WindowAutomationPeer.cs (1)
71if(windowHandle != IntPtr.Zero) //it is Zero on a window that was just closed
System\Windows\Controls\ComboBox.cs (1)
1674if (comboBox.IsDropDownOpen && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero)
System\Windows\Controls\PopupControlService.cs (1)
97if (MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero)
System\Windows\Controls\Primitives\MenuBase.cs (2)
550if (menu.IsMenuMode && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero) 611HwndSource hwndSourceWithFocus = hwndWithFocus != IntPtr.Zero ? HwndSource.CriticalFromHwnd(hwndWithFocus) : null;
System\Windows\Controls\Primitives\Popup.cs (23)
1228bool reestablishCapture = e.OriginalSource != root && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero; 1754if (wParam == IntPtr.Zero) 1787return IntPtr.Zero; 2668if (monitor != IntPtr.Zero) 2749if (hCursor != IntPtr.Zero) 3077UnsafeNativeMethods.SetWindowPos(new HandleRef(null, Handle), new HandleRef(null, IntPtr.Zero), 3086if (parent != IntPtr.Zero) 3099if (hwnd != IntPtr.Zero) 3167lastWebOCHwnd == IntPtr.Zero ? NativeMethods.HWND_TOP : new HandleRef(null, lastWebOCHwnd), 3205while (lastHwnd != IntPtr.Zero) 3305IntPtr parent = IntPtr.Zero; 3337if ( parent != IntPtr.Zero ) 3345if ((parent != IntPtr.Zero) && ConnectedToForegroundWindow(parent)) 3375while (window != IntPtr.Zero) 3394return (hwnd!=null ? hwnd.Handle : IntPtr.Zero); 3402if (child != IntPtr.Zero) 3408return IntPtr.Zero; 3427if (Handle != IntPtr.Zero && (UnsafeNativeMethods.IsWinEventHookInstalled(NativeMethods.EVENT_OBJECT_FOCUS) || UnsafeNativeMethods.IsWinEventHookInstalled(NativeMethods.EVENT_OBJECT_STATECHANGE))) 3432if (popupRootAutomationPeer.Hwnd == IntPtr.Zero) 3435IntPtr lResult = AutomationInteropProvider.ReturnRawElementProvider(Handle, IntPtr.Zero, new IntPtr(NativeMethods.OBJID_CLIENT), RootProviderForHwnd); 3436if (lResult != IntPtr.Zero) 3441hr = UnsafeNativeMethods.ObjectFromLresult(lResult, ref iid, IntPtr.Zero, ref acc); 3519return DpiUtil.GetProcessDpiAwareness(IntPtr.Zero) == NativeMethods.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE;
System\Windows\Controls\WebBrowser.cs (4)
277rgvarg = IntPtr.Zero 299dp.rgvarg = (args == null) ? IntPtr.Zero : UnsafeNativeMethods.ArrayToVARIANTHelper.ArrayToVARIANTVector(args); 301dp.rgdispidNamedArgs = IntPtr.Zero; 329if (dp.rgvarg != IntPtr.Zero)
System\windows\Documents\CaretElement.cs (2)
962IntPtr hwnd = IntPtr.Zero; 970if (hwnd != IntPtr.Zero)
System\Windows\Documents\ImmComposition.cs (22)
185IntPtr hwnd = IntPtr.Zero; 190if (himc != IntPtr.Zero) 320IntPtr lret = IntPtr.Zero; 399if (himc == IntPtr.Zero) 410size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_RESULTSTR, IntPtr.Zero, 0); 424size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPSTR, IntPtr.Zero, 0); 436cursorPos = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_CURSORPOS, IntPtr.Zero, 0); 444deltaStart = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_DELTASTART, IntPtr.Zero, 0); 452size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPATTR, IntPtr.Zero, 0); 566if (himc != IntPtr.Zero) 748if (himc != IntPtr.Zero) 1270IntPtr lret = IntPtr.Zero; 1305return IntPtr.Zero; 1327if (lParam != IntPtr.Zero) 1487return IntPtr.Zero; 1492return IntPtr.Zero; 1501return IntPtr.Zero; 1720IntPtr hwnd = IntPtr.Zero; 1726IntPtr lret = IntPtr.Zero; 1727if (himc != IntPtr.Zero) 1729IntPtr hwndDefIme = IntPtr.Zero; 1735return (lret != IntPtr.Zero) ? true : false;
System\Windows\Documents\MoveSizeWinEventHandler.cs (1)
71while (hwndTemp != IntPtr.Zero)
System\Windows\Documents\NaturalLanguageHyphenator.cs (2)
71if (!_disposed && _hyphenatorResource != IntPtr.Zero) 113if (_hyphenatorResource == IntPtr.Zero)
System\windows\Documents\TextEditorContextMenu.cs (1)
301IntPtr hwnd = IntPtr.Zero;
System\windows\Documents\TextEditorDragDrop.cs (2)
652IntPtr hwnd = IntPtr.Zero; 659if (hwnd != IntPtr.Zero)
System\windows\Documents\TextEditorTyping.cs (1)
1603IntPtr hwnd = IntPtr.Zero;
System\Windows\Documents\TextStore.cs (3)
1168hwnd = IntPtr.Zero; 2617IntPtr hwnd = IntPtr.Zero; 3282IntPtr hwnd = IntPtr.Zero;
System\Windows\Documents\WinEventHandler.cs (4)
84_hHook = UnsafeNativeMethods.SetWinEventHook(_eventMin, _eventMax, IntPtr.Zero, _winEventProc, 86if (_hHook == IntPtr.Zero ) 96if (_hHook != IntPtr.Zero ) 99_hHook = IntPtr.Zero ;
System\Windows\Input\KeyboardNavigation.cs (1)
3274if (activeWindow != IntPtr.Zero)
System\Windows\Interop\ActiveXHost.cs (4)
143if (ControlHandle.Handle == IntPtr.Zero) 145IntPtr inplaceWindow = IntPtr.Zero; 499IntPtr.Zero, 520if (this.ParentHandle.Handle != IntPtr.Zero)
System\Windows\Interop\HwndHost.cs (33)
68if (_hwnd.Handle != IntPtr.Zero) 72_hwnd = new HandleRef(null, IntPtr.Zero); 301if (Handle != IntPtr.Zero && (hwndFocus.Handle == _hwnd.Handle || UnsafeNativeMethods.IsChild(_hwnd, hwndFocus))) 338if (( Handle != IntPtr.Zero) && IsVisible) 552_hwnd = new HandleRef(null, IntPtr.Zero); 610return IntPtr.Zero ; 625IntPtr result = IntPtr.Zero; 654new HandleRef(null, IntPtr.Zero), 692if(Handle != IntPtr.Zero) 724if(Handle != IntPtr.Zero) 731HandleRef hdcScreen = new HandleRef(this, UnsafeNativeMethods.GetDC(new HandleRef(this, IntPtr.Zero))); 732if(hdcScreen.Handle != IntPtr.Zero) 734HandleRef hdcBitmap = new HandleRef(this, IntPtr.Zero); 735HandleRef hBitmap = new HandleRef(this, IntPtr.Zero); 740if(hdcBitmap.Handle != IntPtr.Zero) 744if(hBitmap.Handle != IntPtr.Zero) 776UnsafeNativeMethods.CriticalRedrawWindow(_hwnd, IntPtr.Zero, IntPtr.Zero, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_ALLCHILDREN); 781System.Windows.Media.Imaging.BitmapSource bitmapSource = Imaging.CriticalCreateBitmapSourceFromHBitmap(hBitmap.Handle, IntPtr.Zero, Int32Rect.Empty, null, WICBitmapAlphaChannelOption.WICBitmapIgnoreAlpha); 796UnsafeNativeMethods.ReleaseDC(new HandleRef(this, IntPtr.Zero), hdcScreen); 797hdcScreen = new HandleRef(null, IntPtr.Zero); 799if(hBitmap.Handle != IntPtr.Zero) 802hBitmap = new HandleRef(this, IntPtr.Zero); 805if(hdcBitmap.Handle != IntPtr.Zero) 808hdcBitmap = new HandleRef(this, IntPtr.Zero); 922IntPtr hwndParent = IntPtr.Zero; 948if(hwndParent != IntPtr.Zero) 950if(_hwnd.Handle == IntPtr.Zero) 966else if (Handle != IntPtr.Zero) 1009if(_hwnd.Handle == IntPtr.Zero || !UnsafeNativeMethods.IsWindow(_hwnd)) 1075if( Handle == IntPtr.Zero) 1091_hwnd = new HandleRef(null, IntPtr.Zero); 1104IntPtr result = IntPtr.Zero ;
System\Windows\Interop\WindowInteropHelper.cs (1)
96if (Handle == IntPtr.Zero)
System\Windows\MessageBox.cs (8)
107return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, defaultResult, options); 122return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, defaultResult, 0); 136return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, 0, 0); 149return ShowCore(IntPtr.Zero, messageBoxText, caption, button, MessageBoxImage.None, 0, 0); 159return ShowCore(IntPtr.Zero, messageBoxText, caption, MessageBoxButton.OK, MessageBoxImage.None, 0, 0); 169return ShowCore(IntPtr.Zero, messageBoxText, String.Empty, MessageBoxButton.OK, MessageBoxImage.None, 0, 0); 395if (owner != IntPtr.Zero) 402if (owner == IntPtr.Zero)
System\Windows\Shell\WindowChromeWorker.cs (23)
139if (IntPtr.Zero != _hwnd) 206if (_chromeInfo != null && _hwnd != IntPtr.Zero) 222if (_hwnd == IntPtr.Zero || _hwndSource.IsDisposed) 246NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags); 347return IntPtr.Zero; 432IntPtr retVal = IntPtr.Zero; 508if (IntPtr.Zero != lRet) 533return IntPtr.Zero; 553return IntPtr.Zero; 582return IntPtr.Zero; 590return IntPtr.Zero; 660if (IntPtr.Zero != hmenu) 703if (IntPtr.Zero == _hwnd || _hwndSource.IsDisposed) 725NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags); 731NativeMethods.SetWindowRgn(_hwnd, IntPtr.Zero, NativeMethods.IsWindowVisible(_hwnd)); 767IntPtr hrgn = IntPtr.Zero; 772hrgn = IntPtr.Zero; 799IntPtr hrgn = IntPtr.Zero; 849hrgn = IntPtr.Zero; 885IntPtr hrgn = IntPtr.Zero; 933if (IntPtr.Zero == _hwnd) 1137if (!Utility.IsOSVistaOrNewer || _hwnd == IntPtr.Zero) 1155NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
System\Windows\Standard\MessageWindow.cs (7)
71IntPtr.Zero, 72IntPtr.Zero, 73IntPtr.Zero, 113_dispatcher.BeginInvoke(DispatcherPriority.Normal, (DispatcherOperationCallback)_DestroyWindowCallback, new object [] { IntPtr.Zero, className }); 115else if (Handle != IntPtr.Zero) 130Handle = IntPtr.Zero; 143IntPtr ret = IntPtr.Zero;
System\Windows\Standard\NativeMethods.cs (28)
1410if (!_hwnd.HasValue || _hwnd.Value == IntPtr.Zero) 1425dc = NativeMethods.CreateDC(deviceName, null, IntPtr.Zero, IntPtr.Zero); 1447IntPtr hPtr = IntPtr.Zero; 1495return GetDC(IntPtr.Zero); 1506_hwnd = IntPtr.Zero, 1562handle = IntPtr.Zero; 1598handle = IntPtr.Zero; 2349IntPtr argv = IntPtr.Zero; 2355if (argv == IntPtr.Zero) 2373Assert.AreEqual(IntPtr.Zero, p); 2389hBitmap = _CreateDIBSectionIntPtr(IntPtr.Zero, ref bitmapInfo, DIB_RGB_COLORS, out ppvBits, hSection, dwOffset); 2410if (IntPtr.Zero == ret) 2423if (IntPtr.Zero == ret) 2436if (IntPtr.Zero == ret) 2476if (IntPtr.Zero == ret) 2735if (retPtr == IntPtr.Zero) 2762if (retPtr == IntPtr.Zero) 2778IntPtr ret = IntPtr.Zero; 2787if (IntPtr.Zero == ret) 2924if (ret == IntPtr.Zero) 3066if (ret == IntPtr.Zero) 3079if (ret == IntPtr.Zero) 3166if (!_UpdateLayeredWindowIntPtr(hwnd, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, crKey, ref pblend, dwFlags))
System\Windows\Standard\Utilities.cs (3)
190gdiObject = IntPtr.Zero; 191if (IntPtr.Zero != p) 200hwnd = IntPtr.Zero;
System\Windows\SystemCommands.cs (5)
31if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd)) 36NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero); 80if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd)) 87uint cmd = NativeMethods.TrackPopupMenuEx(hmenu, TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD, (int)physicalScreenLocation.X, (int)physicalScreenLocation.Y, hwnd, IntPtr.Zero); 90NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr(cmd), IntPtr.Zero);
System\Windows\SystemParameters.cs (2)
5757HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 5762if (dc == IntPtr.Zero)
System\Windows\SystemResources.cs (3)
1106parent: IntPtr.Zero, 1423return IntPtr.Zero ; 1510return DpiUtil.GetProcessDpiAwarenessContextValue(IntPtr.Zero);
System\Windows\Window.cs (46)
251UnsafeNativeMethods.SendMessage( Handle, WindowMessage.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_MOUSEMOVE, IntPtr.Zero); 252UnsafeNativeMethods.SendMessage( Handle, WindowMessage.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero); 292_dialogOwnerHandle = IntPtr.Zero; 302if (_dialogOwnerHandle == IntPtr.Zero) 309if ((_dialogOwnerHandle != IntPtr.Zero) && 312_dialogOwnerHandle = IntPtr.Zero; 317if (_dialogOwnerHandle != IntPtr.Zero) 322while (_dialogOwnerHandle != IntPtr.Zero) 358if (hWndCapture != IntPtr.Zero) 426if ( (_dialogPreviousActiveHandle != IntPtr.Zero) && 1286SetOwnerHandle(_ownerWindow != null ? _ownerWindow.Handle: IntPtr.Zero); 2601if (handle != IntPtr.Zero) 2830new HandleRef(null, IntPtr.Zero), 2913new HandleRef(null, IntPtr.Zero), 3014new HandleRef(null, IntPtr.Zero), 3188return IntPtr.Zero; 3776IntPtr hMonitor = IntPtr.Zero; 3777if ((_ownerHandle == IntPtr.Zero) || 3789if (hMonitor != IntPtr.Zero) 3813if (Owner.Handle == IntPtr.Zero) 3831if ((_ownerHandle != IntPtr.Zero) && UnsafeNativeMethods.IsWindow(new HandleRef(null, _ownerHandle))) 3870Debug.Assert(hMonitor != IntPtr.Zero); 3879if (hMonitor == IntPtr.Zero) 4159if (_ownerHandle == ownerHandle && _ownerHandle == IntPtr.Zero) 4167_ownerHandle = (IntPtr.Zero == ownerHandle && !ShowInTaskbar) 4240IntPtr retInt = IntPtr.Zero ; 4467(_dialogPreviousActiveHandle != IntPtr.Zero) && 5984if (hMonitor != IntPtr.Zero) 6227new HandleRef(null, IntPtr.Zero), 6347IntPtr.Zero, 6370if (_ownerHandle == IntPtr.Zero) 6392SetOwnerHandle(IntPtr.Zero); 6400UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), WM_APPLYTASKBARITEMINFO, IntPtr.Zero, IntPtr.Zero); 6735nativeTB.hIcon = IntPtr.Zero; 6852if (manager.Dirty && Handle != IntPtr.Zero) 6916SetOwnerHandle(IntPtr.Zero); 7221private IntPtr _ownerHandle = IntPtr.Zero; // no need to dispose this 7275private IntPtr _dialogOwnerHandle = IntPtr.Zero; 7377return IntPtr.Zero; 7396if ( monitor != IntPtr.Zero ) 7794return DpiUtil.GetProcessDpiAwareness(IntPtr.Zero) == NativeMethods.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE; 7809var nullHandle = new HandleRef(null, IntPtr.Zero); 7813IntPtr.Zero, 7815IntPtr.Zero);
PresentationFramework-SystemDrawing (1)
SystemDrawingExtension.cs (1)
46return IntPtr.Zero;
PresentationUI (5)
MS\Internal\Documents\Application\FileController.cs (1)
455IntPtr.Zero, originalUri, doc.DestinationToken.Location);
MS\Internal\Documents\PeoplePickerWrapper.cs (4)
178pPersistQuery = IntPtr.Zero, //We aren't persisting this query anywhere 179pFormParameters = IntPtr.Zero //We aren't pre-populating the form 267if( hWndParent != IntPtr.Zero ) 326Invariant.Assert(_ptrToDsObjectNames != IntPtr.Zero, "Invalid pointer to DsObjectNames data.");
ReachFramework (23)
MS\Internal\Printing\Configuration\COMPSTUISRID.cs (1)
73this._compstuiHandle = UnsafeNativeMethods.LoadLibraryExW("compstui.dll", IntPtr.Zero, SafeLoadLibraryFlags);
MS\Internal\Printing\Configuration\DevMode.cs (1)
455if (devModeWPointer == IntPtr.Zero)
MS\Internal\Printing\Configuration\SafeWinSpoolPrinterHandle.cs (2)
16: base(IntPtr.Zero, true) 26return (base.handle == IntPtr.Zero);
MS\Internal\Printing\Configuration\WinSpoolPrinterCapabilities.cs (1)
61if (hdc != IntPtr.Zero)
PrintConfig\FallbackPTProvider.cs (7)
55if (!UnsafeNativeMethods.OpenPrinterW(deviceName, out this._deviceHandle, new HandleRef(this, IntPtr.Zero))) 510result = UnsafeNativeMethods.DocumentPropertiesW(new HandleRef(this, IntPtr.Zero), this._deviceHandle, this._deviceName, outPtr, buffer, flags); 749if (pPrinterName != IntPtr.Zero) 756if (pPortName != IntPtr.Zero) 763if (pDriverName != IntPtr.Zero) 770if (pDevMode != IntPtr.Zero) 815if (pDevMode != IntPtr.Zero)
PrintConfig\PTProvider.cs (9)
44private SafePTProviderHandle() : base(IntPtr.Zero, true) 58return (IsClosed || (handle == IntPtr.Zero)); 422if (umDevMode != IntPtr.Zero) 425umDevMode = IntPtr.Zero; 458IntPtr umDevMode = IntPtr.Zero; 487if (umDevMode != IntPtr.Zero) 490umDevMode = IntPtr.Zero; 788uint hResult = UnsafeNativeMethods.CreateStreamOnHGlobal(SafeMemoryHandle.Wrap(IntPtr.Zero), true, out result); 808stream.Seek(0, 0 /*STREAM_SEEK_SET*/ , IntPtr.Zero);
PrintSystemExceptions\PrintSystemException.cs (2)
271IntPtr.Zero, 276IntPtr.Zero);
rzc (1)
ServerProtocol\NativeMethods.cs (1)
45internal static readonly IntPtr NullPtr = IntPtr.Zero;
System.CodeDom (3)
System\CodeDom\Compiler\Executor.cs (3)
28ExecWaitWithCapture(IntPtr.Zero, cmd, currentDir, tempFiles, ref outputName, ref errorName); 31ExecWaitWithCapture(IntPtr.Zero, cmd, Environment.CurrentDirectory, tempFiles, ref outputName, ref errorName); 35if (userToken != IntPtr.Zero)
System.Data.Odbc (15)
Common\System\Data\ProviderBase\DbBuffer.cs (5)
17protected DbBuffer(int initialSize) : base(IntPtr.Zero, true) 28if (IntPtr.Zero == base.handle) 45return (IntPtr.Zero == base.handle); 375base.handle = IntPtr.Zero; 376if (IntPtr.Zero != ptr)
System\Data\Odbc\OdbcDataReader.cs (1)
2420cbActual = IntPtr.Zero;
System\Data\Odbc\OdbcHandle.cs (8)
17protected OdbcHandle(ODBC32.SQL_HANDLE handleType, OdbcHandle? parentHandle) : base(IntPtr.Zero, true) 31retcode = Interop.Odbc.SQLAllocHandle(handleType, IntPtr.Zero, out base.handle); 55if (IntPtr.Zero != base.handle) 78internal OdbcHandle(OdbcStatementHandle parentHandle, ODBC32.SQL_ATTR attribute) : base(IntPtr.Zero, true) 98if (IntPtr.Zero != base.handle) 131return (IntPtr.Zero == base.handle); 139base.handle = IntPtr.Zero; 141if (IntPtr.Zero != handle)
System\Data\Odbc\OdbcParameter.cs (1)
1074parameterBuffer.WriteIntPtr(_preparedIntOffset, IntPtr.Zero);
System.Data.OleDb (126)
ColumnBinding.cs (7)
636if (IntPtr.Zero != ptr) 671if (IntPtr.Zero != ptr) 697IntPtr ptr = IntPtr.Zero; 719if (IntPtr.Zero != ptr) 744IntPtr ptr = IntPtr.Zero; 763IntPtr ptr = IntPtr.Zero; 1038IntPtr ptr = IntPtr.Zero;
DbBindings.cs (1)
124return IntPtr.Zero;
DbPropSet.cs (9)
19public DBPropSet() : base(IntPtr.Zero, true) 34if (IntPtr.Zero != base.handle) 39if (IntPtr.Zero == base.handle) 125return (IntPtr.Zero == base.handle); 133base.handle = IntPtr.Zero; 134if (IntPtr.Zero != ptr) 140if (IntPtr.Zero != rgProperties) 247if (IntPtr.Zero != propset.rgProperties) 257if (IntPtr.Zero == propset.rgProperties)
OleDb_Util.cs (4)
389internal static readonly IntPtr DBRESULTFLAG_DEFAULT = IntPtr.Zero; 558internal static readonly IntPtr DB_INVALID_HACCESSOR = IntPtr.Zero; 559internal static readonly IntPtr DB_NULL_HCHAPTER = IntPtr.Zero; 560internal static readonly IntPtr DB_NULL_HROW = IntPtr.Zero;
OleDbCommand.cs (12)
861hr = _icommandText!.Execute(IntPtr.Zero, in ODB.IID_IMultipleResults, dbParams, out _recordsAffected, out executeResult); 879hr = _icommandText!.Execute(IntPtr.Zero, in ODB.IID_IRowset, dbParams, out _recordsAffected, out executeResult); 883hr = _icommandText!.Execute(IntPtr.Zero, in ODB.IID_NULL, dbParams, out _recordsAffected, out executeResult); 896hr = _icommandText!.Execute(IntPtr.Zero, in ODB.IID_IRow, dbParams, out _recordsAffected, out executeResult); 997hr = iopenRowset.Value.OpenRowset(IntPtr.Zero, tableID, IntPtr.Zero, in ODB.IID_IRowset, propSet.PropertySetCount, propSet.DangerousGetHandle(), out executeResult); 1009hr = iopenRowset.Value.OpenRowset(IntPtr.Zero, tableID, IntPtr.Zero, in ODB.IID_IRowset, 0, IntPtr.Zero, out executeResult); 1014hr = iopenRowset.Value.OpenRowset(IntPtr.Zero, tableID, IntPtr.Zero, in ODB.IID_IRowset, 0, IntPtr.Zero, out executeResult);
OleDbConnectionInternal.cs (10)
339transactionJoin.Value.JoinTransaction(oleTxTransaction, (int)IsolationLevel.Unspecified, 0, IntPtr.Zero); 411IntPtr literalInfo = IntPtr.Zero; 540IntPtr literalInfo = IntPtr.Zero; 585IntPtr schemaGuids = IntPtr.Zero; 586IntPtr schemaRestrictions = IntPtr.Zero; 597if (IntPtr.Zero != schemaGuids) 605if (IntPtr.Zero != schemaRestrictions) 635hr = dbSchemaRowset.GetRowset(IntPtr.Zero, in schema, restrictions.Length, restrictions, in ODB.IID_IRowset, 0, IntPtr.Zero, out rowset); 646dataReader.InitializeIRowset(rowset, ChapterHandle.DB_NULL_HCHAPTER, IntPtr.Zero);
OleDbDataReader.cs (13)
475IntPtr columnInfos = IntPtr.Zero; // ptr to byvalue tagDBCOLUMNINFO[] 564if (IntPtr.Zero != dbColumnInfo.columnid.ulPropid) 574info.propid = IntPtr.Zero; 615hr = icolumnsRowset.GetColumnsRowset(IntPtr.Zero, cOptColumns, prgOptColumns, in ODB.IID_IRowset, 0, IntPtr.Zero, out rowset); 679IntPtr affected = IntPtr.Zero; 1238hr = imultipleResults.GetResult(IntPtr.Zero, ODB.DBRESULTFLAG_DEFAULT, in ODB.IID_NULL, out affected, out _); 1329hr = imultipleResults.GetResult(IntPtr.Zero, ODB.DBRESULTFLAG_DEFAULT, in ODB.IID_IRowset, out affected, out result); 1705hr = irowset.GetNextRows(_chapterHandle.HChapter, /*skipCount*/IntPtr.Zero, _rowHandleFetchCount, out _rowFetchedCount, ref rowHandlesPtr); 1781hr = irowset.ReleaseRows(_rowFetchedCount, _rowHandleNativeBuffer!, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); 2239dataReader.InitializeIRowset(rowset, ChapterHandle.DB_NULL_HCHAPTER, IntPtr.Zero);
OleDbEnumerator.cs (2)
66IntPtr propSets = IntPtr.Zero; 67OleDbHResult hr = srcrowset.GetSourcesRowset(IntPtr.Zero, ODB.IID_IRowset, propCount, propSets, out value);
OleDbParameter.cs (1)
435bindings.Name = IntPtr.Zero;
OleDbStruct.cs (2)
50if (IntPtr.Zero != pwszDataSourceType) 78if (IntPtr.Zero != pwszDataSourceType)
OleDbTransaction.cs (2)
35hr = transaction.StartTransaction(isolevel, 0, IntPtr.Zero, out _); 109if (_mustComplete && (IntPtr.Zero != base.handle))
OleDbWrapper.cs (11)
72hr = GetDataSource(base.handle, IntPtr.Zero, ODB.CLSCTX_ALL, connectionStringPtr, riid, &handle); 129IntPtr idbCreateSession = IntPtr.Zero; 180if ((0 <= hr) && (IntPtr.Zero != idbCreateSession)) 211hr = CreateSession(idbCreateSession, IntPtr.Zero, riid, &handle); 244hr = CreateSession(idbCreateSession, IntPtr.Zero, riid, &handle); 270if (IntPtr.Zero != idbCreateSession) 331IntPtr idbCreateCommand = IntPtr.Zero; 347if ((0 <= hresult) && (IntPtr.Zero != idbCreateCommand)) 361if (IntPtr.Zero != idbCreateCommand) 408IntPtr nativeICommandText = IntPtr.Zero; 423hr = CreateCommand(base.handle, IntPtr.Zero, riid, &nativeICommandText);
PropertyInfoSet.cs (10)
32internal PropertyInfoSet(UnsafeNativeMethods.IDBProperties idbProperties, PropertyIDSet propIDSet) : base(IntPtr.Zero, true) 43if ((0 <= hr) && (IntPtr.Zero != handle)) 53return ((IntPtr.Zero == base.handle) && (IntPtr.Zero == this.descBuffer)); 66if (IntPtr.Zero != this.handle) 113base.handle = IntPtr.Zero; 114if (IntPtr.Zero != ptr) 121if (IntPtr.Zero != infoPtr) 137this.descBuffer = IntPtr.Zero; 138if (IntPtr.Zero != ptr)
RowBinding.cs (13)
271if (IntPtr.Zero == ptr) 284if (IntPtr.Zero == pinnedValue) 396Debug.Assert(IntPtr.Zero != buffer && _needToReset && _haveData, "shouldn't be calling ResetValues"); 472IntPtr chapter = SafeNativeMethods.InterlockedExchangePointer(ADP.IntPtrOffset(buffer, valueOffset), IntPtr.Zero); 493if ((IntPtr.Zero != currentValue) && (currentValue != originalValue)) 497if (IntPtr.Zero != originalValue) 503Marshal.WriteIntPtr(buffer, valueOffset, IntPtr.Zero); 504Marshal.WriteIntPtr(buffer, valueOffset + IntPtr.Size, IntPtr.Zero); 523if ((IntPtr.Zero != currentValue) && (currentValue != originalValue)) 529Marshal.WriteIntPtr(buffer, valueOffset, IntPtr.Zero); 530Marshal.WriteIntPtr(buffer, valueOffset + IntPtr.Size, IntPtr.Zero); 578value = SafeNativeMethods.InterlockedExchangePointer(ptr, IntPtr.Zero); 597if (IntPtr.Zero != buffer)
SafeHandles.cs (19)
22public DualCoTaskMem() : base(IntPtr.Zero, true) 24this.handle2 = IntPtr.Zero; 50internal DualCoTaskMem(UnsafeNativeMethods.IColumnsRowset icolumnsRowset, out IntPtr cOptColumns, out OleDbHResult hr) : base(IntPtr.Zero, true) 59return (((IntPtr.Zero == base.handle)) && (IntPtr.Zero == this.handle2)); 68base.handle = IntPtr.Zero; 69if (IntPtr.Zero != ptr) 75this.handle2 = IntPtr.Zero; 76if (IntPtr.Zero != ptr) 112internal static readonly ChapterHandle DB_NULL_HCHAPTER = new ChapterHandle(IntPtr.Zero); 117if ((null == chapteredRowset) || (IntPtr.Zero == binding.ReadIntPtr(valueOffset))) 127if (IntPtr.Zero == chapter) 163_chapterHandle = IntPtr.Zero; 165if ((IntPtr.Zero != base.handle) && (IntPtr.Zero != chapter)) 198if (pChapteredRowset != IntPtr.Zero) 221if (pTransaction != IntPtr.Zero) 224hr = (OleDbHResult)transactionLocal.Abort(IntPtr.Zero, false, false); 244if (pTransaction != IntPtr.Zero)
SafeNativeMethods.cs (1)
45Interop.OleAut32.SetErrorInfo(0, IntPtr.Zero);
System\Data\ProviderBase\DbBuffer.cs (4)
17protected unsafe DbBuffer(int initialSize) : base(IntPtr.Zero, true) 29if (IntPtr.Zero == base.handle) 46return (IntPtr.Zero == base.handle); 348base.handle = IntPtr.Zero;
System\Data\ProviderBase\WrappedIUnknown.cs (4)
17public WrappedIUnknown() : base(IntPtr.Zero, true) 39return (IntPtr.Zero == base.handle); 71base.handle = IntPtr.Zero; 72if (IntPtr.Zero != ptr)
UnsafeNativeMethods.cs (1)
830_pMultipleTrustee = IntPtr.Zero;
System.Diagnostics.EventLog (68)
System\Diagnostics\EventLogInternal.cs (2)
674hModule = Interop.Kernel32.LoadLibraryExW(dllName, IntPtr.Zero, Interop.Kernel32.LOAD_LIBRARY_AS_DATAFILE); 680hModule = Interop.Kernel32.LoadLibraryExW(dllName, IntPtr.Zero, Interop.Kernel32.LOAD_LIBRARY_AS_DATAFILE);
System\Diagnostics\Reader\CoTaskMemSafeHandle.cs (3)
14: base(IntPtr.Zero, true) 32return IsClosed || handle == IntPtr.Zero; 39handle = IntPtr.Zero;
System\Diagnostics\Reader\CoTaskMemUnicodeSafeHandle.cs (4)
14: base(IntPtr.Zero, true) 19: base(IntPtr.Zero, ownsHandle) 38return IsClosed || handle == IntPtr.Zero; 45handle = IntPtr.Zero;
System\Diagnostics\Reader\EventLogHandle.cs (4)
15: base(IntPtr.Zero, true) 20: base(IntPtr.Zero, ownsHandle) 29return IsClosed || handle == IntPtr.Zero; 36handle = IntPtr.Zero;
System\Diagnostics\Reader\EventLogWatcher.cs (7)
134if (_eventsBuffer[i] != IntPtr.Zero) 137_eventsBuffer[i] = IntPtr.Zero; 192IntPtr.Zero, 193IntPtr.Zero, 280_eventsBuffer[i] = IntPtr.Zero; // user is responsible for calling Dispose(). 302if (_eventsBuffer[i] != IntPtr.Zero) 305_eventsBuffer[i] = IntPtr.Zero;
System\Diagnostics\Reader\NativeWrapper.cs (48)
355IntPtr buffer = IntPtr.Zero; 360bool status = UnsafeNativeMethods.EvtGetEventInfo(handle, enumType, 0, IntPtr.Zero, out bufferNeeded); 381if (buffer != IntPtr.Zero) 388IntPtr buffer = IntPtr.Zero; 392bool status = UnsafeNativeMethods.EvtGetQueryInfo(handle, enumType, 0, IntPtr.Zero, ref bufferNeeded); 410if (buffer != IntPtr.Zero) 417IntPtr buffer = IntPtr.Zero; 422bool status = UnsafeNativeMethods.EvtGetPublisherMetadataProperty(pmHandle, thePropertyId, 0, 0, IntPtr.Zero, out bufferNeeded); 440if (buffer != IntPtr.Zero) 447IntPtr buffer = IntPtr.Zero; 451bool status = UnsafeNativeMethods.EvtGetPublisherMetadataProperty(pmHandle, thePropertyId, 0, 0, IntPtr.Zero, out bufferNeeded); 476if (buffer != IntPtr.Zero) 526IntPtr buffer = IntPtr.Zero; 531bool status = UnsafeNativeMethods.EvtGetObjectArrayProperty(objArrayHandle, thePropertyId, index, 0, 0, IntPtr.Zero, out bufferNeeded); 550if (buffer != IntPtr.Zero) 557IntPtr buffer = IntPtr.Zero; 562bool status = UnsafeNativeMethods.EvtGetEventMetadataProperty(handle, enumType, 0, 0, IntPtr.Zero, out bufferNeeded); 580if (buffer != IntPtr.Zero) 587IntPtr buffer = IntPtr.Zero; 592bool status = UnsafeNativeMethods.EvtGetChannelConfigProperty(handle, enumType, 0, 0, IntPtr.Zero, out bufferNeeded); 617if (buffer != IntPtr.Zero) 762IntPtr buffer = IntPtr.Zero; 767bool status = UnsafeNativeMethods.EvtGetLogInfo(handle, enumType, 0, IntPtr.Zero, out bufferNeeded); 785if (buffer != IntPtr.Zero) 792IntPtr buffer = IntPtr.Zero; 793IntPtr pointer = IntPtr.Zero; 799bool status = UnsafeNativeMethods.EvtRender(contextHandle, eventHandle, flag, 0, IntPtr.Zero, out bufferNeeded, out propCount); 883if (buffer != IntPtr.Zero) 892IntPtr buffer = IntPtr.Zero; 900bool status = UnsafeNativeMethods.EvtRender(contextHandle, eventHandle, flag, 0, IntPtr.Zero, out bufferNeeded, out propCount); 929if (buffer != IntPtr.Zero) 988IntPtr buffer = IntPtr.Zero; 1009status = UnsafeNativeMethods.EvtFormatMessageBuffer(pmHandle, eventHandle, 0, 0, IntPtr.Zero, flag, bufferNeeded, buffer, out bufferNeeded); 1036if (buffer != IntPtr.Zero) 1043IntPtr buffer = IntPtr.Zero; 1050bool status = UnsafeNativeMethods.EvtRender(EventLogHandle.Zero, eventHandle, flag, 0, IntPtr.Zero, out bufferNeeded, out propCount); 1068if (buffer != IntPtr.Zero) 1162return (val.SidVal == IntPtr.Zero) ? null : new SecurityIdentifier(val.SidVal); 1164return (val.GuidReference == IntPtr.Zero) ? Guid.Empty : Marshal.PtrToStructure<Guid>(val.GuidReference); 1181if (val.Reference == IntPtr.Zero) 1187if (val.Reference == IntPtr.Zero) 1193if (val.Reference == IntPtr.Zero) 1199if (val.Reference == IntPtr.Zero) 1205if (val.Reference == IntPtr.Zero) 1211if (val.Reference == IntPtr.Zero) 1258if (val.StringVal == IntPtr.Zero) 1266if (val.AnsiString == IntPtr.Zero) 1274if (val.Handle == IntPtr.Zero)
System.Diagnostics.PerformanceCounter (4)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (4)
33GetMessage(errorCode, IntPtr.Zero); 38if (moduleHandle != IntPtr.Zero) 47int length = FormatMessage(flags, moduleHandle, unchecked((uint)errorCode), 0, bufferPtr, stackBuffer.Length, IntPtr.Zero); 62int length = FormatMessage(flags | FORMAT_MESSAGE_ALLOCATE_BUFFER, moduleHandle, unchecked((uint)errorCode), 0, &nativeMsgPtr, 0, IntPtr.Zero);
System.Diagnostics.Process (4)
Microsoft\Win32\SafeHandles\SafeProcessHandle.cs (1)
39: this(IntPtr.Zero)
src\runtime\src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.ParseMapModules.cs (1)
69EntryPointAddress = IntPtr.Zero // unknown
System\Diagnostics\Process.Linux.cs (1)
161minWorkingSet = IntPtr.Zero; // no defined limit available
System\Diagnostics\Process.Unix.cs (1)
484public IntPtr MainWindowHandle => IntPtr.Zero;
System.Diagnostics.StackTrace (5)
System\Diagnostics\StackTraceSymbols.cs (5)
119if (loadedPeAddress == IntPtr.Zero && assemblyPath == null && inMemoryPdbAddress == IntPtr.Zero) 127provider = inMemoryPdbAddress != IntPtr.Zero ? 145Debug.Assert(inMemoryPdbAddress != IntPtr.Zero); 171if (loadedPeAddress != IntPtr.Zero && loadedPeSize > 0)
System.DirectoryServices (60)
Interop\UnsafeNativeMethods.cs (3)
16IntPtr ppObjectNative = IntPtr.Zero; 22ppObject = ppObjectNative != IntPtr.Zero ? Marshal.GetObjectForIUnknown(ppObjectNative) : null!; 27if (ppObjectNative != IntPtr.Zero)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeTokenHandle.cs (3)
14public SafeTokenHandle() : base(IntPtr.Zero, true) { } 17internal SafeTokenHandle(IntPtr handle) : base(IntPtr.Zero, true) 24get { return new SafeTokenHandle(IntPtr.Zero); }
System\DirectoryServices\ActiveDirectory\ADAMInstance.cs (3)
27private IntPtr _authIdentity = IntPtr.Zero; 823if (_ADAMHandle == IntPtr.Zero) 826if (_authIdentity == IntPtr.Zero)
System\DirectoryServices\ActiveDirectory\DirectoryContext.cs (2)
554IntPtr pResponseBuffer = IntPtr.Zero; 616if (pResponseBuffer != IntPtr.Zero)
System\DirectoryServices\ActiveDirectory\DomainController.cs (8)
42private IntPtr _dsHandle = IntPtr.Zero; 43private IntPtr _authIdentity = IntPtr.Zero; 1045IntPtr dcInfoPtr = IntPtr.Zero; 1136if (dcInfoPtr != IntPtr.Zero) 1180if (_dsHandle == IntPtr.Zero) 1183if (_authIdentity == IntPtr.Zero) 1223IntPtr rolesPtr = IntPtr.Zero; 1268if (rolesPtr != IntPtr.Zero)
System\DirectoryServices\ActiveDirectory\Forest.cs (4)
837IntPtr dsHandle = IntPtr.Zero; 838IntPtr authIdentity = IntPtr.Zero; 839IntPtr sitesPtr = IntPtr.Zero; 885if (sitesPtr != IntPtr.Zero)
System\DirectoryServices\ActiveDirectory\Locator.cs (10)
32IntPtr pDomainControllerInfo = IntPtr.Zero; 45result = Interop.Netapi32.DsGetDcName(computerName, domainName, IntPtr.Zero, siteName, (int)(flags | (long)PrivateLocatorFlags.ReturnDNSName), out pDomainControllerInfo); 58if (pDomainControllerInfo != IntPtr.Zero) 134IntPtr retGetDcContext = IntPtr.Zero; 135IntPtr sockAddressCountPtr = IntPtr.Zero; 136IntPtr sockAddressList = IntPtr.Zero; 137IntPtr dcDnsHostNamePtr = IntPtr.Zero; 141result = Interop.Netapi32.DsGetDcOpen(domainName, (int)optionFlags, siteName, IntPtr.Zero, null, (int)dcFlags, out retGetDcContext); 169if (sockAddressList != IntPtr.Zero) 175if (dcDnsHostNamePtr != IntPtr.Zero)
System\DirectoryServices\ActiveDirectory\Utils.cs (26)
102IntPtr results = IntPtr.Zero; 125result = dsCrackNames(IntPtr.Zero, NativeMethods.DS_NAME_FLAG_SYNTACTICAL_ONLY, 133if ((dsNameResult.itemCount >= 1) && (dsNameResult.items != IntPtr.Zero)) 168if (results != IntPtr.Zero) 197IntPtr results = IntPtr.Zero; 219result = dsCrackNames(IntPtr.Zero, NativeMethods.DS_NAME_FLAG_SYNTACTICAL_ONLY, 228if ((dsNameResult.itemCount >= 1) && (dsNameResult.items != IntPtr.Zero)) 243if (results != IntPtr.Zero) 663if (authIdentity != IntPtr.Zero) 712if (dsHandle != IntPtr.Zero) 1984IntPtr pCopyOfUserSid = IntPtr.Zero; 1985IntPtr pMachineDomainSid = IntPtr.Zero; 2020if (pCopyOfUserSid != IntPtr.Zero) 2023if (pMachineDomainSid != IntPtr.Zero) 2032IntPtr pBuffer = IntPtr.Zero; 2080IntPtr.Zero, 2133if (pBuffer != IntPtr.Zero) 2141IntPtr pBuffer = IntPtr.Zero; 2168Debug.Assert(pBuffer != IntPtr.Zero); 2190if (pBuffer != IntPtr.Zero) 2197IntPtr dsRoleInfoPtr = IntPtr.Zero; 2223if (dsRoleInfoPtr != IntPtr.Zero) 2284IntPtr pSid = IntPtr.Zero; 2295if (pSid != IntPtr.Zero) 2304IntPtr pBytes = IntPtr.Zero; 2318Debug.Assert(pBytes != IntPtr.Zero);
System\DirectoryServices\DirectorySearcher.cs (1)
833vlvValue.target = IntPtr.Zero;
System.DirectoryServices.AccountManagement (69)
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.LsaLookupSids.cs (1)
42if (domainList.Domains != IntPtr.Zero)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeTokenHandle.cs (3)
14public SafeTokenHandle() : base(IntPtr.Zero, true) { } 17internal SafeTokenHandle(IntPtr handle) : base(IntPtr.Zero, true) 24get { return new SafeTokenHandle(IntPtr.Zero); }
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_LoadStore.cs (4)
523IntPtr pSid = IntPtr.Zero; 541if (pSid != IntPtr.Zero) 578IntPtr pSid = IntPtr.Zero; 596if (pSid != IntPtr.Zero)
System\DirectoryServices\AccountManagement\AD\SidList.cs (5)
23IntPtr hUser = IntPtr.Zero; 44if (hUser != IntPtr.Zero) 246public IntPtr pSid = IntPtr.Zero; 254if (pSid != IntPtr.Zero) 257pSid = IntPtr.Zero;
System\DirectoryServices\AccountManagement\AuthZSet.cs (17)
48IntPtr pClientContext = IntPtr.Zero; 49IntPtr pResManager = IntPtr.Zero; 50IntPtr pBuffer = IntPtr.Zero; 67IntPtr.Zero, 68IntPtr.Zero, 69IntPtr.Zero, 83IntPtr.Zero, 85IntPtr.Zero, 101IntPtr.Zero 188pBuffer = IntPtr.Zero; 209if (pClientContext != IntPtr.Zero) 212if (pResManager != IntPtr.Zero) 215if (pBuffer != IntPtr.Zero) 522public SafeMemoryPtr() : base(IntPtr.Zero, true) 526internal SafeMemoryPtr(IntPtr handle) : base(IntPtr.Zero, true) 534get { return (handle == IntPtr.Zero); } 539if (handle != IntPtr.Zero)
System\DirectoryServices\AccountManagement\interopt.cs (2)
22IntPtr ppObjPtr = IntPtr.Zero; 35if (ppObjPtr != IntPtr.Zero)
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx_LoadStore.cs (5)
350IntPtr pSid = IntPtr.Zero; 368if (pSid != IntPtr.Zero) 415IntPtr pSid = IntPtr.Zero; 433if (pSid != IntPtr.Zero) 1036hr = enumerator.Next(1, nativeMembers, IntPtr.Zero);
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx.cs (2)
1048IntPtr buffer = IntPtr.Zero; 1072if (buffer != IntPtr.Zero)
System\DirectoryServices\AccountManagement\User.cs (2)
194IntPtr pSid = IntPtr.Zero; 209if (pSid != IntPtr.Zero)
System\DirectoryServices\AccountManagement\Utils.cs (28)
119IntPtr pSid = IntPtr.Zero; 142if (pSid != IntPtr.Zero) 151IntPtr pBytes = IntPtr.Zero; 169Debug.Assert(pBytes != IntPtr.Zero); 185IntPtr pSid = IntPtr.Zero; 195if (pSid != IntPtr.Zero) 257IntPtr pSid = IntPtr.Zero; 268if (pSid != IntPtr.Zero) 296IntPtr pCopyOfUserSid = IntPtr.Zero; 297IntPtr pMachineDomainSid = IntPtr.Zero; 332if (pCopyOfUserSid != IntPtr.Zero) 335if (pMachineDomainSid != IntPtr.Zero) 344IntPtr pBuffer = IntPtr.Zero; 396IntPtr.Zero, 459if (pBuffer != IntPtr.Zero) 468IntPtr pBuffer = IntPtr.Zero; 503Debug.Assert(pBuffer != IntPtr.Zero); 529if (pBuffer != IntPtr.Zero) 560IntPtr domainControllerInfoPtr = IntPtr.Zero; 564int err = Interop.Logoncli.DsGetDcName(computerName, domainName, IntPtr.Zero, siteName, flags, out domainControllerInfoPtr); 583if (domainControllerInfoPtr != IntPtr.Zero) 597IntPtr hUser = IntPtr.Zero; 604Debug.Assert(hUser != IntPtr.Zero || 643if (hUser != IntPtr.Zero) 723hUserToken = IntPtr.Zero; 724IntPtr hToken = IntPtr.Zero; 792IntPtr dsRoleInfoPtr = IntPtr.Zero; 816if (dsRoleInfoPtr != IntPtr.Zero)
System.DirectoryServices.Protocols (148)
src\runtime\src\libraries\Common\src\Interop\Interop.Ldap.cs (12)
189public nint bv_val = nint.Zero; 206public IntPtr ldctl_oid = IntPtr.Zero; 248_native.query = managed.query is not null ? Marshal.GetFunctionPointerForDelegate(managed.query) : IntPtr.Zero; 249_native.notify = managed.notify is not null ? Marshal.GetFunctionPointerForDelegate(managed.notify) : IntPtr.Zero; 250_native.dereference = managed.dereference is not null ? Marshal.GetFunctionPointerForDelegate(managed.dereference) : IntPtr.Zero; 262query = _native.query != IntPtr.Zero ? Marshal.GetDelegateForFunctionPointer<QUERYFORCONNECTIONInternal>(_native.query) : null, 263notify = _native.notify != IntPtr.Zero ? Marshal.GetDelegateForFunctionPointer<NOTIFYOFNEWCONNECTIONInternal>(_native.notify) : null, 264dereference = _native.dereference != IntPtr.Zero ? Marshal.GetDelegateForFunctionPointer<DEREFERENCECONNECTIONInternal>(_native.dereference) : null 296public IntPtr attribute = IntPtr.Zero; 297public IntPtr values = IntPtr.Zero; 301if (attribute != IntPtr.Zero) 306if (values != IntPtr.Zero)
src\runtime\src\libraries\Common\src\Interop\Linux\OpenLdap\Interop.Ldap.cs (3)
80return IntPtr.Zero; 91return IntPtr.Zero; 100ldap_get_option_int(IntPtr.Zero, LdapOption.LDAP_OPT_DEBUG_LEVEL, ref unused);
System\DirectoryServices\Protocols\common\BerConverter.cs (16)
253IntPtr flattenptr = IntPtr.Zero; 267if (flattenptr != IntPtr.Zero) 285if (flattenptr != IntPtr.Zero) 319berValue.bv_val = IntPtr.Zero; 447if (berValue.bv_val != IntPtr.Zero) 485IntPtr result = IntPtr.Zero; 497if (result != IntPtr.Zero) 510if (result != IntPtr.Zero) 519IntPtr berValArray = IntPtr.Zero; 561if (berValArray != IntPtr.Zero) 566if (ptr != IntPtr.Zero) 575if (managedBerval.bv_val != IntPtr.Zero) 589IntPtr ptrResult = IntPtr.Zero; 601if (ptrResult != IntPtr.Zero) 604while (tempPtr != IntPtr.Zero) 630if (ptrResult != IntPtr.Zero)
System\DirectoryServices\Protocols\common\utils.cs (1)
48Marshal.WriteIntPtr(tempPtr, IntPtr.Zero);
System\DirectoryServices\Protocols\Interop\LdapPal.Linux.cs (7)
76internal static int ParseReference(ConnectionHandle ldapHandle, IntPtr result, ref IntPtr referrals) => Interop.Ldap.ldap_parse_reference(ldapHandle, result, ref referrals, IntPtr.Zero, 0); 125IntPtr passwordPtr = IntPtr.Zero; 135return Interop.Ldap.ldap_sasl_bind(ld, who, Interop.LDAP_SASL_SIMPLE, passwordBerval, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); 165message = IntPtr.Zero; 192if (ldapHandle == IntPtr.Zero)
System\DirectoryServices\Protocols\Interop\SafeHandles.Linux.cs (6)
29if (value == IntPtr.Zero) 43IntPtr nullPointer = IntPtr.Zero; 47handle = IntPtr.Zero; 57if (handle == IntPtr.Zero) 68if (value.bv_val == IntPtr.Zero || value.bv_len.Value == 0) 73if (handle == IntPtr.Zero)
System\DirectoryServices\Protocols\ldap\LdapConnection.cs (63)
490IntPtr serverControlArray = IntPtr.Zero; 492IntPtr clientControlArray = IntPtr.Zero; 497IntPtr modArray = IntPtr.Zero; 502IntPtr searchAttributes = IntPtr.Zero; 771if (serverControlArray != IntPtr.Zero) 777if (tempPtr != IntPtr.Zero) 789if (managedServerControls[i].ldctl_oid != IntPtr.Zero) 796if (managedServerControls[i].ldctl_value.bv_val != IntPtr.Zero) 804if (clientControlArray != IntPtr.Zero) 810if (tempPtr != IntPtr.Zero) 823if (managedClientControls[i].ldctl_oid != IntPtr.Zero) 830if (managedClientControls[i].ldctl_value.bv_val != IntPtr.Zero) 838if (modArray != IntPtr.Zero) 844if (tempPtr != IntPtr.Zero) 860if (berValuePtr != null && berValuePtr.bv_val != IntPtr.Zero) 865if (searchAttributes != IntPtr.Zero) 870if (tempPtr != IntPtr.Zero) 898if (CAs != IntPtr.Zero) 931*certificate = IntPtr.Zero; 1217bv_val = IntPtr.Zero 1350IntPtr ldapResult = IntPtr.Zero; 1353IntPtr requestName = IntPtr.Zero; 1354IntPtr requestValue = IntPtr.Zero; 1456if (requestName != IntPtr.Zero) 1463if (requestValue != IntPtr.Zero) 1467if (val.bv_len.Value != 0 && val.bv_val != IntPtr.Zero) 1498while (entryMessage != IntPtr.Zero) 1513while (referenceMessage != IntPtr.Zero) 1552if (requestName != IntPtr.Zero) 1557if (requestValue != IntPtr.Zero) 1562if (ldapResult != IntPtr.Zero) 1603IntPtr dn = IntPtr.Zero; 1604IntPtr message = IntPtr.Zero; 1605IntPtr referral = IntPtr.Zero; 1606IntPtr control = IntPtr.Zero; 1621if (referral != IntPtr.Zero) 1647if (control != IntPtr.Zero) 1653while (singleControl != IntPtr.Zero) 1683if (dn != IntPtr.Zero) 1688if (message != IntPtr.Zero) 1693if (referral != IntPtr.Zero) 1698if (control != IntPtr.Zero) 1707IntPtr dn = IntPtr.Zero; 1708IntPtr attribute = IntPtr.Zero; 1709IntPtr address = IntPtr.Zero; 1716if (dn != IntPtr.Zero) 1720dn = IntPtr.Zero; 1730while (attribute != IntPtr.Zero) 1740if (address != IntPtr.Zero) 1743address = IntPtr.Zero; 1750if (dn != IntPtr.Zero) 1755if (attribute != IntPtr.Zero) 1760if (address != IntPtr.Zero) 1779if (valuesArray != IntPtr.Zero) 1783while (tempPtr != IntPtr.Zero) 1788if (bervalue.bv_len.Value > 0 && bervalue.bv_val != IntPtr.Zero) 1802if (valuesArray != IntPtr.Zero) 1813IntPtr referenceArray = IntPtr.Zero; 1823if (referenceArray != IntPtr.Zero) 1826while (tempPtr != IntPtr.Zero) 1836referenceArray = IntPtr.Zero; 1853if (referenceArray != IntPtr.Zero) 1923Debug.Assert(control.ldctl_oid != IntPtr.Zero);
System\DirectoryServices\Protocols\ldap\LdapConnection.Linux.cs (6)
146return Interop.Ldap.ldap_sasl_interactive_bind(_ldapHandle, null, Interop.KerberosDefaultMechanism, IntPtr.Zero, IntPtr.Zero, Interop.LDAP_SASL_QUIET, LdapPal.SaslInteractionProcedure, ptrToDefaults); 158IntPtr outValue = IntPtr.Zero; 160if (error == 0 && outValue != IntPtr.Zero) 165if (error == 0 && outValue != IntPtr.Zero) 170if (error == 0 && outValue != IntPtr.Zero)
System\DirectoryServices\Protocols\ldap\LdapSessionOptions.cs (34)
555IntPtr serverControlArray = IntPtr.Zero; 557IntPtr clientControlArray = IntPtr.Zero; 559IntPtr ldapResult = IntPtr.Zero; 560IntPtr referral = IntPtr.Zero; 606if (ldapResult != IntPtr.Zero) 609int resultError = LdapPal.ParseResultReferral(_connection._ldapHandle, ldapResult, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, ref referral, IntPtr.Zero, 0 /* not free it */); 610if (resultError == 0 && referral != IntPtr.Zero) 626if (referral != IntPtr.Zero) 629referral = IntPtr.Zero; 671if (serverControlArray != IntPtr.Zero) 677if (tempPtr != IntPtr.Zero) 689if (managedServerControls[i].ldctl_oid != IntPtr.Zero) 696if (managedServerControls[i].ldctl_value.bv_val != IntPtr.Zero) 704if (clientControlArray != IntPtr.Zero) 710if (tempPtr != IntPtr.Zero) 723if (managedClientControls[i].ldctl_oid != IntPtr.Zero) 730if (managedClientControls[i].ldctl_value.bv_val != IntPtr.Zero) 736if (referral != IntPtr.Zero) 829if (outValue != IntPtr.Zero) 849IntPtr inValue = IntPtr.Zero; 862if (inValue != IntPtr.Zero) 884*ConnectionToUse = IntPtr.Zero; 893if (NewDNPtr != IntPtr.Zero) 905if (ReferralFromConnection != IntPtr.Zero) 954if (newConnection != IntPtr.Zero && _callbackRoutine.NotifyNewConnection != null) 957if (newDNPtr != IntPtr.Zero) 972if (referralFromConnection != IntPtr.Zero) 997if (newConnection != IntPtr.Zero) 1043if (ConnectionToDereference != IntPtr.Zero && _callbackRoutine.DereferenceConnection != null) 1094IntPtr certPtr = IntPtr.Zero; 1098Debug.Assert(serverCert != IntPtr.Zero);
System.Drawing.Common (20)
System\Drawing\Graphics.cs (15)
2283DrawImageAbort? callback) => DrawImage(image, destRect, srcX, srcY, srcWidth, srcHeight, srcUnit, imageAttrs, callback, IntPtr.Zero); 2343DrawImageAbort? callback) => DrawImage(image, destRect, (float)srcX, srcY, srcWidth, srcHeight, srcUnit, imageAttr, callback, IntPtr.Zero); 2450EnumerateMetafile(metafile, destPoint, callback, IntPtr.Zero); 2456EnumerateMetafile(metafile, destPoint, callback, IntPtr.Zero); 2462EnumerateMetafile(metafile, destRect, callback, IntPtr.Zero); 2468EnumerateMetafile(metafile, destRect, callback, IntPtr.Zero); 2474EnumerateMetafile(metafile, destPoints, callback, IntPtr.Zero); 2480IntPtr callbackData) => EnumerateMetafile(metafile, destPoints, callback, IntPtr.Zero, null); 2483EnumerateMetafile(metafile, destPoints, callback, IntPtr.Zero); 2493EnumerateMetafileProc callback) => EnumerateMetafile(metafile, destPoint, srcRect, srcUnit, callback, IntPtr.Zero); 2508EnumerateMetafileProc callback) => EnumerateMetafile(metafile, destPoint, srcRect, srcUnit, callback, IntPtr.Zero); 2523EnumerateMetafileProc callback) => EnumerateMetafile(metafile, destRect, srcRect, srcUnit, callback, IntPtr.Zero); 2538EnumerateMetafileProc callback) => EnumerateMetafile(metafile, destRect, srcRect, srcUnit, callback, IntPtr.Zero); 2553EnumerateMetafileProc callback) => EnumerateMetafile(metafile, destPoints, srcRect, srcUnit, callback, IntPtr.Zero); 2568EnumerateMetafileProc callback) => EnumerateMetafile(metafile, destPoints, srcRect, srcUnit, callback, IntPtr.Zero);
System\Drawing\Icon.cs (1)
395if (handle == IntPtr.Zero)
System\Drawing\Image.cs (1)
774public static Bitmap FromHbitmap(IntPtr hbitmap) => FromHbitmap(hbitmap, IntPtr.Zero);
System\Drawing\Printing\PrintController.SafeDeviceModeHandle.cs (2)
21public SafeDeviceModeHandle() : base(IntPtr.Zero, ownsHandle: true) 25internal SafeDeviceModeHandle(IntPtr handle) : base(IntPtr.Zero, ownsHandle: true)
System\Drawing\Region.cs (1)
82if (regionHandle == IntPtr.Zero)
System.IO.Compression (11)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeZstdHandle.cs (8)
16public SafeZstdCompressHandle() : base(IntPtr.Zero, true) { } 84public override bool IsInvalid => handle == IntPtr.Zero; 91public SafeZstdDecompressHandle() : base(IntPtr.Zero, true) { } 159public override bool IsInvalid => handle == IntPtr.Zero; 164public SafeZstdCDictHandle() : base(IntPtr.Zero, true) { } 175public override bool IsInvalid => handle == IntPtr.Zero; 180public SafeZstdDDictHandle() : base(IntPtr.Zero, true) { } 191public override bool IsInvalid => handle == IntPtr.Zero;
src\runtime\src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (2)
22internal static readonly IntPtr ZNullPtr = IntPtr.Zero; 179SetHandle(IntPtr.Zero);
System\IO\Compression\DeflateEncoder.cs (1)
275_state.NextIn = IntPtr.Zero;
System.IO.Compression.Brotli (13)
src\runtime\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.FileSystem.AccessControl (10)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.CreateFile.cs (1)
48return CreateFilePrivate(lpFileName, dwDesiredAccess, dwShareMode, null, dwCreationDisposition, dwFlagsAndAttributes, IntPtr.Zero);
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FindFirstFileEx.cs (1)
25return FindFirstFileExPrivate(fileName, FINDEX_INFO_LEVELS.FindExInfoBasic, ref data, FINDEX_SEARCH_OPS.FindExSearchNameMatch, IntPtr.Zero, 0);
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (4)
33GetMessage(errorCode, IntPtr.Zero); 38if (moduleHandle != IntPtr.Zero) 47int length = FormatMessage(flags, moduleHandle, unchecked((uint)errorCode), 0, bufferPtr, stackBuffer.Length, IntPtr.Zero); 62int length = FormatMessage(flags | FORMAT_MESSAGE_ALLOCATE_BUFFER, moduleHandle, unchecked((uint)errorCode), 0, &nativeMsgPtr, 0, IntPtr.Zero);
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeFindHandle.Windows.cs (2)
11public SafeFindHandle() : base(IntPtr.Zero, true) { } 22return handle == IntPtr.Zero || handle == new IntPtr(-1);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\PathHelper.Windows.cs (1)
78while ((result = Interop.Kernel32.GetFullPathNameW(ref MemoryMarshal.GetReference(path), (uint)builder.Capacity, ref builder.GetPinnableReference(), IntPtr.Zero)) > builder.Capacity)
System\IO\FileSystemAclExtensions.cs (1)
296handle = Interop.Kernel32.CreateFile(fullPath, (int)rights, (share & ~FileShare.Inheritable), secAttrs, mode, flagsAndAttributes, 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.Management (70)
System\Management\InteropClasses\WMIInterop.cs (46)
37private IntPtr pWbemClassObject = IntPtr.Zero; 48return IntPtr.Zero; 59if (pWbemClassObject != IntPtr.Zero) 62pWbemClassObject = IntPtr.Zero; 75if (pWbemClassObject == IntPtr.Zero) 88if (pWbemClassObject == IntPtr.Zero) 110if (pWbemClassObject == IntPtr.Zero) 118if (pWbemClassObject == IntPtr.Zero) 126if (pWbemClassObject == IntPtr.Zero) 135if (pWbemClassObject == IntPtr.Zero) 143if (pWbemClassObject == IntPtr.Zero) 153if (pWbemClassObject == IntPtr.Zero) 161if (pWbemClassObject == IntPtr.Zero) 175if (pWbemClassObject == IntPtr.Zero) 189if (pWbemClassObject == IntPtr.Zero) 197if (pWbemClassObject == IntPtr.Zero) 211if (pWbemClassObject == IntPtr.Zero) 225if (pWbemClassObject == IntPtr.Zero) 234if (pWbemClassObject == IntPtr.Zero) 242if (pWbemClassObject == IntPtr.Zero) 250if (pWbemClassObject == IntPtr.Zero) 260if (pInSignature != IntPtr.Zero) 262if (pOutSignature != IntPtr.Zero) 271if (pWbemClassObject == IntPtr.Zero) 281if (pWbemClassObject == IntPtr.Zero) 289if (pWbemClassObject == IntPtr.Zero) 297if (pWbemClassObject == IntPtr.Zero) 308if (pInSignature != IntPtr.Zero) 310if (pOutSignature != IntPtr.Zero) 318if (pWbemClassObject == IntPtr.Zero) 326if (pWbemClassObject == IntPtr.Zero) 339if (pWbemClassObject == IntPtr.Zero) 374private IntPtr pWbemQualifierSet = IntPtr.Zero; 388if (pWbemQualifierSet != IntPtr.Zero) 391pWbemQualifierSet = IntPtr.Zero; 408if (pWbemQualifierSet == IntPtr.Zero) 417if (pWbemQualifierSet == IntPtr.Zero) 425if (pWbemQualifierSet == IntPtr.Zero) 433if (pWbemQualifierSet == IntPtr.Zero) 441if (pWbemQualifierSet == IntPtr.Zero) 449if (pWbemQualifierSet == IntPtr.Zero) 457if (pWbemQualifierSet == IntPtr.Zero) 1329IntPtr pComThreadingInfo = IntPtr.Zero; 1330IntPtr pObjectContext = IntPtr.Zero; 1357if (pComThreadingInfo != IntPtr.Zero) 1359if (pObjectContext != IntPtr.Zero)
System\Management\ManagementBaseObject.cs (1)
261return IntPtr.Zero;
System\Management\ManagementObject.cs (15)
789IntPtr.Zero); 1465IntPtr ppwbemCallResult = IntPtr.Zero; 1466IntPtr pwbemCallResult = IntPtr.Zero; 1476Marshal.WriteIntPtr(ppwbemCallResult, IntPtr.Zero); // Init to NULL. 1519if (ppwbemCallResult != IntPtr.Zero) // Cleanup from allocations above. 1522if (pwbemCallResult != IntPtr.Zero) 1758IntPtr ppwbemCallResult = IntPtr.Zero; 1759IntPtr pwbemCallResult = IntPtr.Zero; 1769Marshal.WriteIntPtr(ppwbemCallResult, IntPtr.Zero); // Init to NULL. 1817if (ppwbemCallResult != IntPtr.Zero) // Cleanup from allocations above. 1820if (pwbemCallResult != IntPtr.Zero) 1966IntPtr.Zero); 1974IntPtr.Zero); 2303IntPtr.Zero); 2629status = scope.GetSecuredIWbemServicesHandler(wbemServices).GetObject_(objectPath, options.Flags, options.GetContext(), ref tempObj, IntPtr.Zero);
System\Management\ManagementOptions.cs (2)
1675return IntPtr.Zero; 1679return IntPtr.Zero;
System\Management\ManagementScope.cs (3)
313if (hModule == IntPtr.Zero) 382return procAddr != IntPtr.Zero && 1101IntPtr handle = IntPtr.Zero;
System\Management\WmiEventSink.cs (1)
144if (pErrorObj != IntPtr.Zero)
System\Management\wmiutil.cs (2)
33if (IntPtr.Zero != pErrorInfo && new IntPtr(-1) != pErrorInfo) 42if (pIWbemClassObject != IntPtr.Zero)
System.Net.Http.WinHttpHandler (30)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (4)
33GetMessage(errorCode, IntPtr.Zero); 38if (moduleHandle != IntPtr.Zero) 47int length = FormatMessage(flags, moduleHandle, unchecked((uint)errorCode), 0, bufferPtr, stackBuffer.Length, IntPtr.Zero); 62int length = FormatMessage(flags | FORMAT_MESSAGE_ALLOCATE_BUFFER, moduleHandle, unchecked((uint)errorCode), 0, &nativeMsgPtr, 0, IntPtr.Zero);
src\runtime\src\libraries\Common\src\Interop\Windows\SChannel\UnmanagedCertificateContext.IntPtr.cs (2)
15if (certContext == IntPtr.Zero) 22if (context.hCertStore != IntPtr.Zero)
src\runtime\src\libraries\Common\src\Interop\Windows\WinHttp\Interop.winhttp_types.cs (2)
288AutoConfigUrl = managed.AutoConfigUrl is not null ? Marshal.StringToCoTaskMemUni(managed.AutoConfigUrl) : IntPtr.Zero; 300AutoConfigUrl = AutoConfigUrl != IntPtr.Zero ? Marshal.PtrToStringUni(AutoConfigUrl) : null,
src\runtime\src\libraries\Common\src\System\Net\Security\CertificateValidation.Windows.cs (1)
27&& chain.SafeHandle!.DangerousGetHandle() == IntPtr.Zero) // Build failed to generate a valid handle.
System\Net\Http\WinHttpAuthHelper.cs (1)
376IntPtr.Zero))
System\Net\Http\WinHttpChannelBinding.cs (2)
21if (!Interop.WinHttp.WinHttpQueryOption(requestHandle, Interop.WinHttp.WINHTTP_OPTION_SERVER_CBT, IntPtr.Zero, ref dataSize)) 71SetHandle(IntPtr.Zero);
System\Net\Http\WinHttpHandler.cs (7)
826IntPtr.Zero, 1227IntPtr.Zero, 1483IntPtr.Zero, 1627IntPtr.Zero); 1661IntPtr.Zero, 1663IntPtr.Zero, 1699if (!Interop.WinHttp.WinHttpReceiveResponse(state.RequestHandle, IntPtr.Zero))
System\Net\Http\WinHttpRequestCallback.cs (2)
45if (context == IntPtr.Zero) 281IntPtr certHandle = IntPtr.Zero;
System\Net\Http\WinHttpRequestStream.cs (3)
234IntPtr.Zero)) 253IntPtr.Zero, 255IntPtr.Zero))
System\Net\Http\WinHttpResponseParser.cs (1)
96IntPtr.Zero))
System\Net\Http\WinHttpResponseStream.cs (4)
124if (!Interop.WinHttp.WinHttpQueryDataAvailable(_requestHandle, IntPtr.Zero)) 141if (!Interop.WinHttp.WinHttpReadData(_requestHandle, Marshal.UnsafeAddrOfPinnedArrayElement(buffer, 0), (uint)Math.Min(bytesAvailable, buffer.Length), IntPtr.Zero)) 225if (!Interop.WinHttp.WinHttpQueryDataAvailable(_requestHandle, IntPtr.Zero)) 240IntPtr.Zero))
System\Net\Http\WinHttpTrailersHelper.cs (1)
42IntPtr.Zero,
System.Net.HttpListener (2)
src\runtime\src\libraries\Common\src\System\Net\LazyAsyncResult.cs (2)
325ProtectedInvokeCallback(result, IntPtr.Zero); 331ProtectedInvokeCallback(null, IntPtr.Zero);
System.Net.Primitives (2)
System\Net\NetworkCredential.cs (2)
161IntPtr ptr = IntPtr.Zero; 170if (ptr != IntPtr.Zero)
System.Net.Quic (43)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.cs (1)
28if (ret == IntPtr.Zero)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
103if (handle == IntPtr.Zero)
src\runtime\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\runtime\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\runtime\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\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (8)
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) 60base(IntPtr.Zero, ownsHandle: true)
src\runtime\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\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (2)
28SetHandle(IntPtr.Zero); 38return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (9)
33base(IntPtr.Zero, ownsHandle: true) 40SetHandle(IntPtr.Zero); 46get { return handle == IntPtr.Zero; } 53base(IntPtr.Zero, ownsHandle: true) 60SetHandle(IntPtr.Zero); 66get { return handle == IntPtr.Zero; } 73base(IntPtr.Zero, ownsHandle: true) 80SetHandle(IntPtr.Zero); 86get { return handle == IntPtr.Zero; }
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (3)
13base(IntPtr.Zero, ownsHandle: true) 20SetHandle(IntPtr.Zero); 26get { return handle == IntPtr.Zero; }
System\Net\Quic\Internal\MsQuicApi.cs (1)
80IntPtr msQuicHandle = IntPtr.Zero;
System\Net\Quic\Internal\MsQuicConfiguration.cs (3)
17=> certificate is X509Certificate2 certificate2 && certificate2.Handle != IntPtr.Zero && certificate2.HasPrivateKey; 225(void*)IntPtr.Zero, 277PrivateKeyPassword = (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\runtime\src\libraries\Common\src\System\Net\ContextAwareResult.cs (3)
324base.Complete(IntPtr.Zero); 355if (userToken != IntPtr.Zero || context == null) 367base.Complete(IntPtr.Zero);
src\runtime\src\libraries\Common\src\System\Net\LazyAsyncResult.cs (2)
325ProtectedInvokeCallback(result, IntPtr.Zero); 331ProtectedInvokeCallback(null, IntPtr.Zero);
System\Net\TimerThread.cs (3)
205if (_thisHandle == IntPtr.Zero) 245if (_thisHandle != IntPtr.Zero) 248_thisHandle = IntPtr.Zero;
System.Net.Security (84)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.cs (2)
190applicationData = IntPtr.Zero; 243IntPtr.Zero,
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.cs (1)
28if (ret == IntPtr.Zero)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
103if (handle == IntPtr.Zero)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OCSP.cs (2)
108handle = IntPtr.Zero; 123handle = IntPtr.Zero;
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (12)
292Interop.Ssl.SslCtxSetAlpnSelectCb(sslCtx, &AlpnServerSelectCallback, IntPtr.Zero); 1035Debug.Assert(data != IntPtr.Zero, "Expected non-null data pointer from SslGetData"); 1180if (certPtr != IntPtr.Zero) 1214if (sslData == IntPtr.Zero) 1263Debug.Assert(ssl != IntPtr.Zero); 1264Debug.Assert(session != IntPtr.Zero); 1274if (cert == IntPtr.Zero && Interop.Ssl.SslSessionReused(ssl)) 1277if (currentSession != IntPtr.Zero) 1292if (ptr != IntPtr.Zero) 1317Debug.Assert(ctx != IntPtr.Zero && session != IntPtr.Zero); 1320if (ptr == IntPtr.Zero)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (5)
630get { return handle == IntPtr.Zero; } 655Interop.Ssl.SslSetData(handle, IntPtr.Zero); 661SetHandle(IntPtr.Zero); 689public SafeSslHandle() : base(IntPtr.Zero, true) 693internal SafeSslHandle(IntPtr validSslPointer, bool ownsHandle) : base(IntPtr.Zero, ownsHandle)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtx.cs (8)
92: base(IntPtr.Zero, true) 103get { return handle == IntPtr.Zero; } 145Interop.Ssl.SslCtxSetData(handle, IntPtr.Zero); 162SetHandle(IntPtr.Zero); 180Debug.Assert(_sslSessions != null && session != IntPtr.Zero); 197IntPtr oldSession = IntPtr.Zero; 210if (oldSession != IntPtr.Zero) 237IntPtr oldSession = IntPtr.Zero;
src\runtime\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\runtime\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\runtime\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\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (8)
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) 60base(IntPtr.Zero, ownsHandle: true)
src\runtime\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\runtime\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\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (2)
28SetHandle(IntPtr.Zero); 38return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (9)
33base(IntPtr.Zero, ownsHandle: true) 40SetHandle(IntPtr.Zero); 46get { return handle == IntPtr.Zero; } 53base(IntPtr.Zero, ownsHandle: true) 60SetHandle(IntPtr.Zero); 66get { return handle == IntPtr.Zero; } 73base(IntPtr.Zero, ownsHandle: true) 80SetHandle(IntPtr.Zero); 86get { return handle == IntPtr.Zero; }
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (3)
13base(IntPtr.Zero, ownsHandle: true) 20SetHandle(IntPtr.Zero); 26get { return handle == IntPtr.Zero; }
src\runtime\src\libraries\Common\src\System\Net\Security\Unix\SafeDeleteContext.cs (1)
26get { return (IntPtr.Zero == handle); }
System\Net\CertificateValidationPal.Unix.cs (6)
42if (remoteCertificate == IntPtr.Zero) 68if (certPtr != IntPtr.Zero) 86if (remoteCertificate != IntPtr.Zero) 109return Interop.Ssl.SslGetCertificate(ssl) != IntPtr.Zero; 124Debug.Assert(session != IntPtr.Zero); 125return Interop.Ssl.SslSessionGetData(session) != 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)
263if (certificate.Handle != IntPtr.Zero)
System.Net.Sockets (1)
System\Net\Sockets\SocketPal.Unix.cs (1)
628IntPtr fd = IntPtr.Zero;
System.Net.WebSockets (3)
src\runtime\src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (2)
22internal static readonly IntPtr ZNullPtr = IntPtr.Zero; 179SetHandle(IntPtr.Zero);
System\Net\WebSockets\Compression\WebSocketDeflater.cs (1)
161_stream.NextIn = IntPtr.Zero;
System.Net.WebSockets.Client (1)
System\Net\WebSockets\BrowserWebSockets\BrowserWebSocket.cs (1)
390sendTask = BrowserInterop.WebSocketSend(_innerWebSocket!, IntPtr.Zero, 0, (int)messageType, endOfMessage);
System.Private.CoreLib (333)
Internal\Reflection\Augments\ReflectionAugments.cs (1)
539if (pStaticClassConstructionContext != IntPtr.Zero)
Internal\Runtime\Augments\RuntimeAugments.cs (2)
503if (result != IntPtr.Zero) 617if (moduleBase == IntPtr.Zero)
Internal\Runtime\CompilerHelpers\InteropHelpers.cs (14)
227return (byte*)IntPtr.Zero; 250if (pCell->Target != IntPtr.Zero) 263if (hModule == IntPtr.Zero) 306if (hModule == IntPtr.Zero) 319if (hModule == IntPtr.Zero) 326if (hModule == IntPtr.Zero) 333Debug.Assert(hModule != IntPtr.Zero); 334var oldValue = Interlocked.CompareExchange(ref pCell->Handle, hModule, IntPtr.Zero); 335if (oldValue != IntPtr.Zero) 384if (pTarget == IntPtr.Zero) 465return IntPtr.Zero; 481return IntPtr.Zero; 495if (pUnk == IntPtr.Zero) 570if (pSrcNativeVariant == IntPtr.Zero)
Internal\Runtime\CompilerHelpers\RuntimeInteropData.cs (8)
108if (delegateCreationStub == IntPtr.Zero) 117if (pStub == IntPtr.Zero) 140openStub = IntPtr.Zero; 141closedStub = IntPtr.Zero; 142delegateCreationStub = IntPtr.Zero; 204marshalStub = IntPtr.Zero; 205unmarshalStub = IntPtr.Zero; 206destroyStub = IntPtr.Zero;
Internal\Runtime\CompilerServices\FunctionPointerOps.cs (2)
56Debug.Assert(canonFunctionPointer != IntPtr.Zero); 58if (instantiationArgument == IntPtr.Zero)
Internal\Runtime\CompilerServices\OpenMethodResolver.cs (4)
41_nonVirtualOpenInvokeCodePointer = IntPtr.Zero; 52_nonVirtualOpenInvokeCodePointer = IntPtr.Zero; 159if (nonVirtualOpenInvokeCodePointer != IntPtr.Zero) 169if (nonVirtualOpenInvokeCodePointer != IntPtr.Zero)
Internal\Runtime\FrozenObjectHeapManager.cs (1)
148if (m_SegmentHandle == IntPtr.Zero)
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\CompilerHelpers\StartupCodeHelpers.cs (6)
84if (pModuleHeaders[i] != IntPtr.Zero) 93if (pModuleHeaders[i] != IntPtr.Zero) 100if (dehydratedDataSection != IntPtr.Zero) 133if (staticsSection != IntPtr.Zero) 147if (frozenObjectSection != IntPtr.Zero) 156if (RuntimeImports.RhRegisterFrozenSegment((void*)segmentStart, (nuint)length, (nuint)length, (nuint)length) == IntPtr.Zero)
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\TypeLoader\ExternalReferencesTable.cs (2)
27_elements = IntPtr.Zero; 38public bool IsInitialized() { return _elements != IntPtr.Zero; }
src\runtime\src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\CachedInterfaceDispatch.cs (6)
79if (pTargetCode != IntPtr.Zero) 86return IntPtr.Zero; 118return IntPtr.Zero; 144if (pTargetCode == IntPtr.Zero) 213if (DynamicInterfaceCastablePresent() && pTargetCode == IntPtr.Zero && pInstanceType->IsIDynamicInterfaceCastable) 218Diagnostics.Debug.Assert(pTargetCode != IntPtr.Zero);
src\runtime\src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\DispatchResolve.cs (1)
76return IntPtr.Zero;
src\runtime\src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (14)
114if (pFailFastFunction == IntPtr.Zero) 124(reason, unhandledException, IntPtr.Zero, IntPtr.Zero); 163if (pOnFirstChanceFunction == IntPtr.Zero) 185if (pOnUnhandledExceptionFunction == IntPtr.Zero) 211if (pFailFastFunction == IntPtr.Zero) 266if (pAppendStackFrame != IntPtr.Zero) 353IntPtr pGetRuntimeExceptionFunction = IntPtr.Zero; 770IntPtr pReversePInvokePropagationCallback = IntPtr.Zero; 771IntPtr pReversePInvokePropagationContext = IntPtr.Zero; 844if (pCatchHandler == null && pReversePInvokePropagationCallback == IntPtr.Zero && !isExceptionIntercepted 861Debug.Assert(pCatchHandler != null || pReversePInvokePropagationCallback != IntPtr.Zero || unwoundReversePInvoke || isExceptionIntercepted, "We should have a handler if we're starting the second pass"); 913Debug.Assert(pReversePInvokePropagationCallback != IntPtr.Zero, "Unwound to a reverse P/Invoke in the second pass. We should have a propagation handler."); 914Debug.Assert(frameIter.PreviousTransitionFrame != IntPtr.Zero, "Should have a transition frame for reverse P/Invoke.");
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Utilities\LockFreeReaderHashtableOfPointers.cs (14)
178if ((examineEntry == IntPtr.Zero) || (examineEntry == new IntPtr(1))) 195while ((examineEntry != IntPtr.Zero) && (examineEntry != new IntPtr(1))) 263if (ptrValue == IntPtr.Zero) 272if (newHashTable[tableIndex] == IntPtr.Zero) 282while (newHashTable[tableIndex] != IntPtr.Zero) 338if (ptrValue == IntPtr.Zero) 393if (examineEntry != IntPtr.Zero) 407while (examineEntry != IntPtr.Zero) 467if (Interlocked.CompareExchange(ref hashTableLocal[tableIndex], new IntPtr(1), IntPtr.Zero) == IntPtr.Zero) 494Volatile.Write(ref hashTableLocal[tableIndex], IntPtr.Zero); 549if ((examineEntry == IntPtr.Zero) || (examineEntry == new IntPtr(1))) 559while (examineEntry != IntPtr.Zero) 620if ((examineEntry != IntPtr.Zero) && (examineEntry != new IntPtr(1)))
src\runtime\src\libraries\Common\src\Interop\Interop.ICU.cs (2)
17Debug.Assert(icuuc != IntPtr.Zero); 18Debug.Assert(icuin != IntPtr.Zero);
src\runtime\src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (10)
68if (functionHandle != IntPtr.Zero) 81ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 120ArgumentOutOfRangeException.ThrowIfNotEqual(loadContext, IntPtr.Zero); 121ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 191ArgumentOutOfRangeException.ThrowIfNotEqual(loadContext, IntPtr.Zero); 192ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 233if (functionHandle != IntPtr.Zero) 262ArgumentOutOfRangeException.ThrowIfNotEqual(loadContext, IntPtr.Zero); 263ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 316if (delegateTypeNative == IntPtr.Zero)
src\runtime\src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\IsolatedComponentLoadContext.cs (1)
51return IntPtr.Zero;
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\ArgumentNullException.cs (1)
89if (argument == IntPtr.Zero)
src\runtime\src\libraries\System.Private.CoreLib\src\System\ComAwareWeakReference.cs (1)
64Debug.Assert(pComWeakRef != IntPtr.Zero);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventProvider.cs (1)
111if (eventHandle != IntPtr.Zero)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventProvider.cs (1)
1249return IntPtr.Zero;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (9)
243private IntPtr m_writeEventStringEventHandle = IntPtr.Zero; 802Debug.Assert(eventHandle != IntPtr.Zero); 1950decoded = dataPointer == IntPtr.Zero ? null : new string((char*)dataPointer, 0, (data->Size >> 1) - 1); 2176args[i] = dataPointer == IntPtr.Zero ? null : new string((char*)dataPointer, 0, (data->Size >> 1) - 1); 2283m_etwProvider?.WriteEvent(ref descr, IntPtr.Zero, null, null, 1, (IntPtr)((void*)&data)); 2287if (m_writeEventStringEventHandle == IntPtr.Zero) 2296if (m_writeEventStringEventHandle == IntPtr.Zero) 2975if (!m_etwProvider.WriteEvent(ref manifestDescr, IntPtr.Zero, null, null, 2, (IntPtr)dataDescrs)) 3544metadata.EventHandle = IntPtr.Zero;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\NativeRuntimeEventSource.Threading.NativeSinks.cs (2)
252ThreadPoolIOEnqueue((IntPtr)registeredWaitHandle.GetHashCode(), IntPtr.Zero, registeredWaitHandle.Repeating); 291ThreadPoolIODequeue((IntPtr)registeredWaitHandle.GetHashCode(), IntPtr.Zero);
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventHandleTable.cs (1)
26IntPtr ret = IntPtr.Zero;
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CalendarData.Nls.cs (4)
30return Interop.Kernel32.GetCalendarInfoEx(localeName, (uint)calendar, IntPtr.Zero, calType | CAL_RETURN_NUMBER, IntPtr.Zero, 0, out data) != 0; 40int ret = Interop.Kernel32.GetCalendarInfoEx(localeName, (uint)calendar, IntPtr.Zero, calType, (IntPtr)buffer, BUFFER_LENGTH, IntPtr.Zero);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Nls.cs (12)
23return IntPtr.Zero; 27int ret = Interop.Kernel32.LCMapStringEx(cultureName, Interop.Kernel32.LCMAP_SORTHANDLE, null, 0, &handle, IntPtr.Size, null, null, IntPtr.Zero); 42return IntPtr.Zero; 128int sortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 150if (Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 202string? localeName = _sortHandle != IntPtr.Zero ? null : _sortName; 255string? localeName = _sortHandle != IntPtr.Zero ? null : _sortName; 383int sortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 397if (Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 445actualSortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 497sortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 525return Interop.Kernel32.IsNLSDefinedString(Interop.Kernel32.COMPARE_STRING, 0, IntPtr.Zero, pText, text.Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.Nls.cs (3)
126Interop.Kernel32.EnumSystemLocalesEx(&EnumSystemLocalesProc, Interop.Kernel32.LOCALE_SPECIFICDATA | Interop.Kernel32.LOCALE_SUPPLEMENTAL, &context, IntPtr.Zero); 497Interop.Kernel32.EnumSystemLocalesEx(&EnumAllSystemLocalesProc, flags, &context, IntPtr.Zero); 525Interop.Kernel32.EnumSystemLocalesEx(&EnumAllSystemLocalesProc, Interop.Kernel32.LOCALE_REPLACEMENT, &context, IntPtr.Zero);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (1)
180IntPtr byteOffset = IntPtr.Zero;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.Utf8.cs (2)
174IntPtr byteOffset = IntPtr.Zero; 484IntPtr byteOffset = IntPtr.Zero;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.Nls.cs (1)
26int ret = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _textInfoName,
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerator.Unix.cs (7)
51if (_directoryHandle == IntPtr.Zero) 81if (handle == IntPtr.Zero) 86return IntPtr.Zero; 95IntPtr handle = Interlocked.Exchange(ref _directoryHandle, IntPtr.Zero); 96if (handle != IntPtr.Zero) 215_directoryHandle = IntPtr.Zero; 217while (_directoryHandle == IntPtr.Zero)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComAwareWeakReference.ComWrappers.cs (1)
44return s_objectToComWeakRefCallback != null ? s_objectToComWeakRefCallback(target, out context) : IntPtr.Zero;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (36)
79unknown = IntPtr.Zero; 90unknown = IntPtr.Zero; 103if (unknown == IntPtr.Zero) 226if (handle == IntPtr.Zero) 296ppvObject = IntPtr.Zero; 306if (ppvObject == IntPtr.Zero) 338if (ppvObject == IntPtr.Zero) 350if (typeMaybe == IntPtr.Zero) 359Debug.Assert(GetComCount(RefCount) == 0 || HolderHandle == IntPtr.Zero); 361if (HolderHandle == IntPtr.Zero) 377IntPtr handle = Interlocked.Exchange(ref HolderHandle, IntPtr.Zero); 378if (handle != IntPtr.Zero) 429return IntPtr.Zero; 442return IntPtr.Zero; 520if (refCountedHandle != IntPtr.Zero && GCHandle.InternalGet(refCountedHandle) != null) 576referenceTrackerMaybe = IntPtr.Zero; 580if (trackerObject != IntPtr.Zero || 642if (_inner != IntPtr.Zero) 645_inner = IntPtr.Zero; 648_externalComObject = IntPtr.Zero; 674public IntPtr TrackerObject => (_trackerObject == IntPtr.Zero || _trackerObjectDisconnected == 1) ? IntPtr.Zero : _trackerObject; 686Debug.Assert(trackerObject != IntPtr.Zero); 724if (_trackerObject == IntPtr.Zero || Interlocked.CompareExchange(ref _trackerObjectDisconnected, 1, 0) != 0) 738_trackerObject = IntPtr.Zero; 896mow->HolderHandle = IntPtr.Zero; 919if (!TryGetOrCreateObjectForComInstanceInternal(externalComObject, IntPtr.Zero, flags, wrapperMaybe: null, userState: NoUserState.Instance, out obj)) 940if (!TryGetOrCreateObjectForComInstanceInternal(externalComObject, IntPtr.Zero, flags, wrapperMaybe: null, userState, out obj)) 958return GetOrRegisterObjectForComInstance(externalComObject, flags, wrapper, IntPtr.Zero); 1050referenceTrackerMaybe = IntPtr.Zero; 1055if (innerMaybe == IntPtr.Zero && // User didn't supply inner - .NET 5 API scenario sanity check. 1091if (externalComObject == IntPtr.Zero) 1094if (innerMaybe != IntPtr.Zero && !flags.HasFlag(CreateObjectFlags.Aggregation)) 1176if (referenceTrackerMaybe != IntPtr.Zero) 1628targetPtr != IntPtr.Zero) 1666return IntPtr.Zero;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.cs (1)
78IntPtr handle = Interlocked.Exchange(ref _handle, IntPtr.Zero);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.T.cs (3)
41public readonly bool IsAllocated => _handle != IntPtr.Zero; 94if (handle != IntPtr.Zero) 96_handle = IntPtr.Zero;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (18)
558if (ptr == IntPtr.Zero) 602if (ptr == IntPtr.Zero) 645public static Exception? GetExceptionForHR(int errorCode) => GetExceptionForHR(errorCode, IntPtr.Zero); 651/// <param name="errorInfo">Optional platform-specific error information (for example IErrorInfo on COM platforms), or <see cref="IntPtr.Zero"/> when not provided.</param> 671/// <param name="pUnk">A pointer to the COM object involved in the failing call, or <see cref="IntPtr.Zero"/> if unavailable.</param> 960/// <param name="pUnk">A pointer to the COM object involved in the failing call, or <see cref="IntPtr.Zero"/> if unavailable.</param> 1024return IntPtr.Zero; 1046return IntPtr.Zero; 1069return IntPtr.Zero; 1087return IntPtr.Zero; 1110return IntPtr.Zero; 1128return IntPtr.Zero; 1269if (s == IntPtr.Zero) 1284if (s == IntPtr.Zero) 1294if (s == IntPtr.Zero) 1304if (s == IntPtr.Zero) 1314if (s == IntPtr.Zero) 1326return IntPtr.Zero;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.Unix.cs (2)
34private static bool IsNullOrWin32Atom(IntPtr ptr) => ptr == IntPtr.Zero; 87return IntPtr.Zero;
src\runtime\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) 492if (_typeUnion._unionTypes._bstr == IntPtr.Zero)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.cs (10)
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) 273if (throwOnError && ret == IntPtr.Zero) 284if (throwOnError && ret == IntPtr.Zero)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.Unix.cs (2)
15if (ret == IntPtr.Zero) 26Debug.Assert(handle != IntPtr.Zero);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\PinnedGCHandle.T.cs (3)
43public readonly bool IsAllocated => _handle != IntPtr.Zero; 128if (handle != IntPtr.Zero) 130_handle = IntPtr.Zero;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ReferenceTrackerHost.cs (1)
89if (punk == IntPtr.Zero)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\TrackerObjectManager.cs (3)
19Debug.Assert(referenceTracker != IntPtr.Zero); 42Debug.Assert(referenceTracker != IntPtr.Zero); 116return IntPtr.Zero;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\WeakGCHandle.T.cs (3)
42public readonly bool IsAllocated => _handle != IntPtr.Zero; 103if (handle != IntPtr.Zero) 105_handle = IntPtr.Zero;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (3)
496return IntPtr.Zero; 954if (resolvedDll != IntPtr.Zero) 960return IntPtr.Zero;
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMapState.cs (4)
57Debug.Assert((IntPtr)valuesPtr != IntPtr.Zero); 77Debug.Assert((IntPtr)_slowContainsValuesPtr == IntPtr.Zero); 95Debug.Assert((IntPtr)_slowContainsValuesPtr != IntPtr.Zero); 107Debug.Assert((IntPtr)_slowContainsValuesPtr != IntPtr.Zero);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (6)
316IntPtr ptr = IntPtr.Zero; 327ptr = IntPtr.Zero; 333if (ptr != IntPtr.Zero) 354IntPtr ptr = IntPtr.Zero; 390ptr = IntPtr.Zero; 396if (ptr != IntPtr.Zero)
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Portable.cs (3)
111UserUnregisterWaitHandleValue = UserUnregisterWaitHandle?.DangerousGetHandle() ?? IntPtr.Zero; 141UserUnregisterWaitHandleValue = IntPtr.Zero; 171if (handleValue != IntPtr.Zero && handleValue != InvalidHandleValue)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitSubsystem.HandleManager.Unix.cs (3)
52Debug.Assert(handle != IntPtr.Zero); 59if (handle == IntPtr.Zero || handle == new IntPtr(-1)) 74if (handle == IntPtr.Zero || handle == new IntPtr(-1))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitSubsystem.Unix.cs (3)
152IntPtr handle = IntPtr.Zero; 159if (handle == IntPtr.Zero) 398Debug.Assert(waitHandles[i] != IntPtr.Zero);
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.FullGlobalizationData.cs (1)
66IntPtr regionPtr = IntPtr.Zero;
System\Array.NativeAot.cs (1)
263if (constructorEntryPoint == IntPtr.Zero)
System\CrashInfo.cs (1)
249if (moduleBase != nint.Zero)
System\Delegate.cs (3)
71return IntPtr.Zero; 148if (functionResolution == IntPtr.Zero) 383if (objArrayThunk == IntPtr.Zero)
System\Diagnostics\StackFrame.NativeAot.cs (5)
65if (_ipAddress == IntPtr.Zero || _ipAddress == Exception.EdiSeparator) 67startAddress = IntPtr.Zero; 78if (_noMethodBaseAvailable || _ipAddress == IntPtr.Zero || _ipAddress == Exception.EdiSeparator) 115else if (_ipAddress != IntPtr.Zero) 161IntPtr ipAddress = (frameIndex < realFrameCount) ? frameArray[frameIndex] : IntPtr.Zero;
System\Reflection\Assembly.NativeAot.cs (1)
42if (frame.GetNativeIPAddress() == IntPtr.Zero)
System\Runtime\CompilerServices\RuntimeHelpers.NativeAot.cs (2)
218if (method.Value == IntPtr.Zero) 224if (method.Value == IntPtr.Zero)
System\Runtime\DependentHandle.cs (2)
13public bool IsAllocated => _handle != IntPtr.Zero; 114_handle = IntPtr.Zero;
System\Runtime\InteropServices\IDynamicInterfaceCastable.cs (1)
36if (result == nint.Zero)
System\Runtime\InteropServices\Marshal.NativeAot.cs (3)
69if (unmarshalStub != IntPtr.Zero) 109if (destroyStructureStub != IntPtr.Zero) 136if (marshalStub != IntPtr.Zero)
System\Runtime\InteropServices\NativeLibrary.NativeAot.cs (6)
22return handle != IntPtr.Zero; 45if (throwOnError && ret == IntPtr.Zero) 94if (ret != IntPtr.Zero) 107if (ret != IntPtr.Zero) 123if (ret != IntPtr.Zero) 130return IntPtr.Zero;
System\Runtime\InteropServices\PInvokeMarshal.cs (11)
52return IntPtr.Zero; 115if (Thunk == IntPtr.Zero) 140IntPtr pTarget = RuntimeInteropData.GetDelegateMarshallingStub(new RuntimeTypeHandle(del.GetMethodTable()), openStaticFunctionPointer != IntPtr.Zero); 141Debug.Assert(pTarget != IntPtr.Zero); 148if (ContextData != IntPtr.Zero) 169if (Thunk != IntPtr.Zero) 197if (ptr == IntPtr.Zero) 239Debug.Assert(pDelegateCreationStub != IntPtr.Zero); 255Debug.Assert(pContext != IntPtr.Zero); 263Debug.Assert(fnPtr != IntPtr.Zero); 280Debug.Assert(pContext != IntPtr.Zero);
System\Runtime\InteropServices\TrackerObjectManager.NativeAot.cs (10)
26return s_trackerManager != IntPtr.Zero; 33Debug.Assert(referenceTracker != IntPtr.Zero); 60Debug.Assert(s_trackerManager != IntPtr.Zero); 85Debug.Assert(s_trackerManager != IntPtr.Zero); 97=> s_trackerManager != IntPtr.Zero; 101return Interlocked.CompareExchange(ref s_trackerManager, referenceTrackerManager, IntPtr.Zero) == IntPtr.Zero; 161nativeObjectWrapper.TrackerObject != IntPtr.Zero) 188nativeObjectWrapper.TrackerObject != IntPtr.Zero && 238if (referenceTrackerTarget == IntPtr.Zero)
System\Runtime\Loader\AssemblyLoadContext.NativeAot.cs (1)
24return IntPtr.Zero;
System\Runtime\RuntimeImports.cs (3)
259if (h == IntPtr.Zero) 278if (h == IntPtr.Zero) 290if (h == IntPtr.Zero)
System\Runtime\ThunkPool.cs (16)
152Debug.Assert(_nextAvailableThunkPtr != IntPtr.Zero); 160if (nextNextAvailableThunkPtr == IntPtr.Zero) 166Debug.Assert(nextNextAvailableThunkPtr != IntPtr.Zero); 171Debug.Assert(nextAvailableThunkPtr != IntPtr.Zero); 175*((IntPtr*)(nextAvailableThunkPtr + IntPtr.Size)) = IntPtr.Zero; 193Debug.Assert(dataAddress != IntPtr.Zero); 238return IntPtr.Zero; 258context = IntPtr.Zero; 259target = IntPtr.Zero; 262if (dataAddress == IntPtr.Zero) 284Debug.Assert(dataAddress != IntPtr.Zero); 311s_currentlyMappedThunkBlocks[s_currentlyMappedThunkBlocksIndex - 1] = IntPtr.Zero; 312Debug.Assert(nextThunksBlock != IntPtr.Zero); 317nextThunksBlock = IntPtr.Zero; 336Debug.Assert(nextThunksBlock != IntPtr.Zero); 345*((IntPtr*)(dataAddress)) = IntPtr.Zero;
System\RuntimeExceptionHelpers.cs (1)
359exceptionRecord.ExceptionRecord = IntPtr.Zero;
System\RuntimeFieldHandle.cs (3)
39if (_value == IntPtr.Zero || handle._value == IntPtr.Zero) 50if (_value == IntPtr.Zero)
System\RuntimeMethodHandle.cs (4)
42if (_value == IntPtr.Zero || handle._value == IntPtr.Zero) 68if (_value == IntPtr.Zero) 100if (_value == IntPtr.Zero)
System\Threading\Thread.NativeAot.Unix.cs (1)
92return IntPtr.Zero;
System.Private.Reflection.Execution (19)
Internal\Reflection\Execution\ExecutionEnvironmentImplementation.MappingTables.cs (8)
266return IntPtr.Zero; 321IntPtr resolver = IntPtr.Zero; 327if (resolver == IntPtr.Zero) 482instantiationArgument = IntPtr.Zero; 490if (instantiationArgument != IntPtr.Zero) 532if (TryGetMethodForOriginalLdFtnResult_InvokeMap_Inner(perModuleLookup.Key, forStartAddress: true, methodStartAddress, IntPtr.Zero, parserOffset, ref declaringTypeHandle, out methodHandle, out _)) 590if (targetAddress != IntPtr.Zero && targetAddress != entryMethodEntrypoint) 633if (!forStartAddress && ((instantiationArgument == IntPtr.Zero) != ((entryFlags & InvokeTableFlags.RequiresInstArg) == 0)))
Internal\Reflection\Execution\ExecutionEnvironmentImplementation.Runtime.cs (1)
35if (classRtMethodHandle == IntPtr.Zero)
Internal\Reflection\Execution\FieldAccessors\LiteralFieldAccessor.cs (1)
12: base(IntPtr.Zero, fieldTypeHandle)
Internal\Reflection\Execution\FieldAccessors\StaticFieldAccessor.cs (3)
27if (_cctorContext != IntPtr.Zero) 39if (_cctorContext != IntPtr.Zero) 50if (_cctorContext != IntPtr.Zero)
Internal\Reflection\Execution\MethodInvokers\MethodInvokerWithMethodInvokeInfo.cs (1)
48else if (methodInvokeInfo.VirtualResolveData != IntPtr.Zero)
Internal\Reflection\Execution\MethodInvokers\VirtualMethodInvoker.cs (5)
51IntPtr resolvedVirtual = IntPtr.Zero; 80IntPtr resolvedVirtual = IntPtr.Zero; 99IntPtr resolvedVirtual = IntPtr.Zero; 145if (MethodInvokeInfo.LdFtnResult == IntPtr.Zero && MethodInvokeInfo.VirtualResolveData != IntPtr.Zero)
System.Private.TypeLoader (60)
Internal\Runtime\TypeLoader\EETypeCreator.cs (5)
159IntPtr typeManager = IntPtr.Zero; 352Debug.Assert((state.Dictionary == null && state.HalfBakedDictionary == IntPtr.Zero) || (state.Dictionary != null && state.HalfBakedDictionary != IntPtr.Zero)); 604Debug.Assert(IntPtr.Zero == state.GcStaticDesc); 605Debug.Assert(IntPtr.Zero == state.ThreadStaticDesc);
Internal\Runtime\TypeLoader\ExternalReferencesTable.NativeFormatModuleInfo.cs (1)
18_elements = IntPtr.Zero;
Internal\Runtime\TypeLoader\GenericDictionaryCell.cs (7)
29auxResult = IntPtr.Zero; 172Debug.Assert(result != IntPtr.Zero); 208Debug.Assert(result != IntPtr.Zero); 273return IntPtr.Zero; 279auxResult = IntPtr.Zero; 316Debug.Assert(GenericMethod.RuntimeMethodDictionary != IntPtr.Zero); 416if (result != IntPtr.Zero)
Internal\Runtime\TypeLoader\NativeLayoutInfoLoadContext.cs (1)
183IntPtr functionPointer = IntPtr.Zero;
Internal\Runtime\TypeLoader\TypeBuilder.cs (11)
51if (method.RuntimeMethodDictionary != IntPtr.Zero) 300if (templateMethod.FunctionPointer != IntPtr.Zero) 524Debug.Assert(method.RuntimeMethodDictionary == IntPtr.Zero && method.Dictionary != null); 609Debug.Assert(state.HalfBakedDictionary != IntPtr.Zero); 665if (dictionaryEntry == IntPtr.Zero) 667Debug.Assert(dictionaryEntry != IntPtr.Zero); 1146auxResult = IntPtr.Zero; 1310Debug.Assert(methodDictionary != IntPtr.Zero); 1316methodDictionary = IntPtr.Zero; 1339auxResult = IntPtr.Zero; 1340return IntPtr.Zero;
Internal\Runtime\TypeLoader\TypeBuilderState.cs (1)
218return TypeBeingBuilt.RuntimeTypeHandle.GetDictionary() != IntPtr.Zero;
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.ConstructedGenericMethodsLookup.cs (8)
116Debug.Assert(value._methodDictionary != IntPtr.Zero); 285result = IntPtr.Zero; 301Debug.Assert(methodPointer != IntPtr.Zero); 302dictionaryPointer = IntPtr.Zero; 343Debug.Assert(methodPointer != IntPtr.Zero && dictionaryPointer != IntPtr.Zero); 350result = IntPtr.Zero; 394result = IntPtr.Zero;
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.ConstructedGenericsRegistration.cs (1)
69Debug.Assert(methodEntry._methodDictionary != IntPtr.Zero);
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.cs (1)
461return (targetMethod != IntPtr.Zero);
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.FieldAccess.cs (1)
95IntPtr fieldAddressCookie = IntPtr.Zero;
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.Metadata.cs (12)
337return IntPtr.Zero; 382return IntPtr.Zero; 423if (result != IntPtr.Zero) 428return IntPtr.Zero; 445if (result != IntPtr.Zero) 449return IntPtr.Zero; 487return IntPtr.Zero; 720Debug.Assert(dictionary != IntPtr.Zero); 734return dictionary == IntPtr.Zero; 787_methodEntrypoint = IntPtr.Zero; 804_methodEntrypoint = IntPtr.Zero; 854methodEntrypoint = IntPtr.Zero;
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.StaticsLookup.cs (7)
47return index.HasValue ? staticInfoLookup.GetIntPtrFromIndex(index.Value) : IntPtr.Zero; 62return IntPtr.Zero; 86return index.HasValue ? staticInfoLookup.GetIntPtrFromIndex(index.Value) : IntPtr.Zero; 101return IntPtr.Zero; 127return index.HasValue ? staticInfoLookup.GetIntPtrFromIndex(index.Value) : IntPtr.Zero; 136if (typeAsEEType->DynamicThreadStaticsIndex != IntPtr.Zero) 142return IntPtr.Zero;
Internal\TypeSystem\InstantiatedMethod.Runtime.cs (1)
56Debug.Assert(rmd != IntPtr.Zero);
Internal\TypeSystem\MethodDesc.Runtime.cs (1)
19Debug.Assert(_functionPointer == IntPtr.Zero || _functionPointer == functionPointer);
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\TypeLoader\ExternalReferencesTable.cs (2)
27_elements = IntPtr.Zero; 38public bool IsInitialized() { return _elements != IntPtr.Zero; }
System.Private.Windows.Core (3)
_generated\120\Windows.Win32.HRESULT.g.cs (1)
68 /// error. You can specify <see cref="IntPtr.Zero"/> to use the current IErrorInfo interface, or
Windows\Win32\System\Variant\VARIANT.cs (2)
401result[i] = data[i] == IntPtr.Zero ? null : ComHelpers.GetObjectForIUnknown((IUnknown*)data[i]); 605if (data == IntPtr.Zero)
System.Private.Windows.Core.TestUtilities (1)
CommonTestHelper.cs (1)
55IntPtr.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)
50/// <exception cref="ArgumentNullException"><paramref name="peImage"/> is <see cref="IntPtr.Zero"/>.</exception> 68/// <exception cref="ArgumentNullException"><paramref name="peImage"/> is <see cref="IntPtr.Zero"/>.</exception>
System.Runtime.InteropServices.JavaScript (5)
System\Runtime\InteropServices\JavaScript\JSFunctionBinding.cs (1)
440if (exceptionPtr != IntPtr.Zero)
System\Runtime\InteropServices\JavaScript\JSProxyContext.cs (3)
319return IntPtr.Zero; 491jso.JSHandle = IntPtr.Zero; 576NextJSVHandle = IntPtr.Zero;
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Exception.cs (1)
35if (slot.JSHandle != IntPtr.Zero)
System.Security.AccessControl (10)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeTokenHandle.cs (3)
14public SafeTokenHandle() : base(IntPtr.Zero, true) { } 17internal SafeTokenHandle(IntPtr handle) : base(IntPtr.Zero, true) 24get { return new SafeTokenHandle(IntPtr.Zero); }
System\Security\AccessControl\Privilege.cs (3)
145private SafeTokenHandle? _threadHandle = new SafeTokenHandle(IntPtr.Zero); 148private static SafeTokenHandle s_processHandle = new SafeTokenHandle(IntPtr.Zero); 207IntPtr.Zero,
System\Security\AccessControl\SecurityDescriptor.cs (2)
449IntPtr byteArray = IntPtr.Zero; 497if (byteArray != IntPtr.Zero)
System\Security\AccessControl\Win32.cs (1)
132if (errorCode == Interop.Errors.ERROR_SUCCESS && IntPtr.Zero.Equals(ByteArray))
System\Security\Principal\Win32.cs (1)
52if (!Interop.Advapi32.SetThreadToken(IntPtr.Zero, hToken))
System.Security.Cryptography (139)
Microsoft\Win32\SafeHandles\NCryptSafeHandles.cs (2)
152IntPtr holderRawHandle = IntPtr.Zero; 164holderRawHandle != IntPtr.Zero &&
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.CryptGetProvParam.cs (1)
61return CryptGetProvParam(safeProvHandle, dwParam, IntPtr.Zero, ref dwDataLen, 0);
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\SafeHashHandle.cs (1)
18SetHandle(IntPtr.Zero);
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\SafeKeyHandle.cs (1)
27SetHandle(IntPtr.Zero);
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\SafeProvHandle.cs (2)
22SetHandle(IntPtr.Zero); 121SetHandle(IntPtr.Zero);
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\Interop.BCryptDuplicateHash.cs (1)
15NTSTATUS status = BCryptDuplicateHash(hHash, out newHash, IntPtr.Zero, 0, 0);
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\Interop.BCryptEncryptDecrypt.cs (2)
23NTSTATUS ntStatus = BCryptEncrypt(hKey, pbInput, input.Length, IntPtr.Zero, iv, iv == null ? 0 : iv.Length, pbOutput, output.Length, out cbResult, 0); 44NTSTATUS ntStatus = BCryptDecrypt(hKey, pbInput, input.Length, IntPtr.Zero, iv, iv == null ? 0 : iv.Length, pbOutput, output.Length, out cbResult, 0);
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\Interop.BCryptExportKey.cs (6)
29NTSTATUS ntStatus = BCryptExportKey(key, IntPtr.Zero, blobType, null, 0, out numBytesNeeded, 0); 37ntStatus = BCryptExportKey(key, IntPtr.Zero, blobType, rented, numBytesNeeded, out numBytesNeeded, 0); 51NTSTATUS ntStatus = BCryptExportKey(key, IntPtr.Zero, blobType, null, 0, out numBytesNeeded, 0); 63ntStatus = BCryptExportKey(key, IntPtr.Zero, blobType, destination, numBytesNeeded, out numBytesNeeded, 0); 85NTSTATUS ntStatus = BCryptExportKey(key, IntPtr.Zero, blobType, null, 0, out numBytesNeeded, 0); 98ntStatus = BCryptExportKey(key, IntPtr.Zero, blobType, rented, numBytesNeeded, out numBytesNeeded, 0);
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\Interop.BCryptImportKey.cs (2)
43NTSTATUS ntStatus = BCryptImportKey(hAlg, IntPtr.Zero, BCRYPT_KEY_DATA_BLOB, out hKey, IntPtr.Zero, 0, pbBlob, blobSize, 0);
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\Interop.BCryptImportKeyPair.cs (1)
37IntPtr.Zero,
src\runtime\src\libraries\Common\src\Interop\Windows\Crypt32\Interop.FindOidInfo.cs (2)
56IntPtr rawKey = IntPtr.Zero; 108if (rawKey != IntPtr.Zero)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (4)
33GetMessage(errorCode, IntPtr.Zero); 38if (moduleHandle != IntPtr.Zero) 47int length = FormatMessage(flags, moduleHandle, unchecked((uint)errorCode), 0, bufferPtr, stackBuffer.Length, IntPtr.Zero); 62int length = FormatMessage(flags | FORMAT_MESSAGE_ALLOCATE_BUFFER, moduleHandle, unchecked((uint)errorCode), 0, &nativeMsgPtr, 0, IntPtr.Zero);
src\runtime\src\libraries\Common\src\Interop\Windows\NCrypt\Interop.NCryptDeriveKeyMaterial.cs (3)
54IntPtr hashAlgorithmString = IntPtr.Zero; 122if (hashAlgorithmString != IntPtr.Zero) 302IntPtr.Zero,
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBCryptHandle.cs (2)
14: base(IntPtr.Zero, true) 23return handle == IntPtr.Zero;
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeCertContextHandle.cs (2)
47SetHandle(IntPtr.Zero); 60SetHandle(IntPtr.Zero);
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeCertContextHandleWithKeyContainerDeletion.cs (1)
81Debug.Assert(hProv == IntPtr.Zero);
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeChainEngineHandle.cs (1)
30SetHandle(IntPtr.Zero);
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeCrypt32Handle.cs (2)
15: base(IntPtr.Zero, true) 21get { return handle == IntPtr.Zero; }
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeUnicodeStringHandle.cs (3)
19: base(IntPtr.Zero, ownsHandle: true) 25: base(IntPtr.Zero, ownsHandle: true) 48return handle == IntPtr.Zero;
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CngHelpers.cs (11)
152ErrorCode errorCode = Interop.NCrypt.NCryptExportKey(handle, IntPtr.Zero, blobType, IntPtr.Zero, null, 0, out numBytesNeeded, 0); 162errorCode = Interop.NCrypt.NCryptExportKey(handle, IntPtr.Zero, blobType, IntPtr.Zero, buffer, buffer.Length, out numBytesNeeded, 0); 189IntPtr.Zero, 191IntPtr.Zero, 210IntPtr.Zero, 212IntPtr.Zero, 256if (buffers[0].pvBuffer == IntPtr.Zero) 286IntPtr.Zero, 314IntPtr.Zero,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECCng.ImportExport.NamedCurve.cs (1)
171IntPtr.Zero,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemCng.Windows.cs (4)
239IntPtr.Zero, 241IntPtr.Zero, 259IntPtr.Zero, 261IntPtr.Zero,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.EncryptDecrypt.cs (2)
101pbLabel = IntPtr.Zero, 181pbLabel = IntPtr.Zero, // It would nice to put randomized data here but RSAEncryptionPadding does not at this point provide support for this.
src\runtime\src\libraries\Common\src\System\Security\Cryptography\SP800108HmacCounterKdfImplementationCng.cs (2)
141pbKeyObject: IntPtr.Zero, 152pbKeyObject: IntPtr.Zero,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519DiffieHellmanCng.Windows.cs (4)
184IntPtr.Zero, 186IntPtr.Zero, 201IntPtr.Zero, 203IntPtr.Zero,
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\CertificateHelpers.Windows.cs (1)
160IntPtr.Zero,
System\Security\Cryptography\CapiHelper.Windows.cs (4)
83if (!Interop.Advapi32.CryptGetDefaultProvider(dwType, IntPtr.Zero, 93if (!Interop.Advapi32.CryptGetDefaultProvider(dwType, IntPtr.Zero, 289if (parameters.ParentWindowHandle != IntPtr.Zero) 317if (password != IntPtr.Zero)
System\Security\Cryptography\CngAsnFormatter.cs (2)
30if (Interop.Crypt32.CryptFormatObject(X509_ASN_ENCODING, 0, dwFormatStrType, IntPtr.Zero, (byte*)oidValuePtr, rawData, rawData.Length, null, ref cbFormat)) 38if (Interop.Crypt32.CryptFormatObject(X509_ASN_ENCODING, 0, dwFormatStrType, IntPtr.Zero, (byte*)oidValuePtr, rawData, rawData.Length, bufferPtr, ref cbFormat))
System\Security\Cryptography\CngKey.Create.cs (1)
100if (creationParameters.ParentWindowHandle != IntPtr.Zero)
System\Security\Cryptography\CngKey.Export.cs (4)
23ErrorCode errorCode = Interop.NCrypt.NCryptExportKey(_keyHandle, IntPtr.Zero, format.Format, IntPtr.Zero, null, 0, out numBytesNeeded, 0); 28errorCode = Interop.NCrypt.NCryptExportKey(_keyHandle, IntPtr.Zero, format.Format, IntPtr.Zero, buffer, buffer.Length, out numBytesNeeded, 0);
System\Security\Cryptography\CngKey.Import.cs (4)
68if (buffers[0].pvBuffer == IntPtr.Zero) 82IntPtr.Zero, 133IntPtr.Zero, 135IntPtr.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\HashProviderCng.cs (2)
39NTSTATUS ntStatus = Interop.BCrypt.BCryptCreateHash(_hAlgorithm, out _hHash, IntPtr.Zero, 0, key, key.Length, BCryptCreateHashFlags.BCRYPT_HASH_REUSABLE_FLAG); 159NTSTATUS ntStatus = Interop.BCrypt.BCryptCreateHash(_hAlgorithm, out hHash, IntPtr.Zero, 0, _key, _key == null ? 0 : _key.Length, Flags);
System\Security\Cryptography\HashProviderDispenser.Windows.cs (1)
300IntPtr.Zero,
System\Security\Cryptography\HKDF.Windows.cs (1)
153pbKeyObject: IntPtr.Zero,
System\Security\Cryptography\LiteHash.Windows.cs (4)
58pbHashObject: IntPtr.Zero, 194pbHashObject: IntPtr.Zero, 328pbHashObject: IntPtr.Zero, 401pbHashObject: IntPtr.Zero,
System\Security\Cryptography\OpenSsl.NotSupported.cs (1)
244public SafeEvpPKeyHandle() : base(IntPtr.Zero, false)
System\Security\Cryptography\Pbkdf2Implementation.Windows.cs (2)
97pbKeyObject: IntPtr.Zero, 131pbKeyObject: IntPtr.Zero,
System\Security\Cryptography\RandomNumberGeneratorImplementation.Windows.cs (1)
14Interop.BCrypt.NTSTATUS status = Interop.BCrypt.BCryptGenRandom(IntPtr.Zero, pbBuffer, count, Interop.BCrypt.BCRYPT_USE_SYSTEM_PREFERRED_RNG);
System\Security\Cryptography\X509Certificates\CertificatePal.Windows.cs (4)
21if (handle == IntPtr.Zero) 128if (parametersBlob.pbData == IntPtr.Zero) 157if (!Interop.Crypt32.CertGetCertificateChain((IntPtr)Interop.Crypt32.ChainEngine.HCCE_CURRENT_USER, _certContext, null, SafeCertStoreHandle.InvalidHandle, ref chainPara, Interop.Crypt32.CertChainFlags.None, IntPtr.Zero, out certChainContext)) 280Interop.Crypt32.DATA_BLOB blob = new Interop.Crypt32.DATA_BLOB(IntPtr.Zero, 0);
System\Security\Cryptography\X509Certificates\ChainPal.Windows.BuildChain.cs (1)
68if (!Interop.Crypt32.CertGetCertificateChain(storeHandle.DangerousGetHandle(), certContext, &ft, extraStoreHandle, ref chainPara, flags, IntPtr.Zero, out chain))
System\Security\Cryptography\X509Certificates\ChainPal.Windows.cs (1)
21if (chainContext == IntPtr.Zero)
System\Security\Cryptography\X509Certificates\FindPal.Windows.cs (2)
396IntPtr.Zero, 424if (!Interop.Crypt32.CertAddCertificateLinkToStore(findResults, pCertContext, Interop.Crypt32.CertStoreAddDisposition.CERT_STORE_ADD_ALWAYS, IntPtr.Zero))
System\Security\Cryptography\X509Certificates\StorePal.Windows.cs (2)
17if (storeHandle == IntPtr.Zero) 54if (!Interop.Crypt32.CertAddCertificateContextToStore(_certStore, certContext, Interop.Crypt32.CertStoreAddDisposition.CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES, IntPtr.Zero))
System\Security\Cryptography\X509Certificates\StorePal.Windows.Export.cs (2)
104Interop.Crypt32.DATA_BLOB dataBlob = new Interop.Crypt32.DATA_BLOB(IntPtr.Zero, 0); 255Interop.Crypt32.DATA_BLOB blob = new Interop.Crypt32.DATA_BLOB(IntPtr.Zero, 0);
System\Security\Cryptography\X509Certificates\StorePal.Windows.Import.cs (10)
46IntPtr.Zero, 48IntPtr.Zero, 50IntPtr.Zero, 51IntPtr.Zero 127IntPtr.Zero, 134!Interop.Crypt32.CertAddCertificateLinkToStore(certStore, certContext, Interop.Crypt32.CertStoreAddDisposition.CERT_STORE_ADD_ALWAYS, IntPtr.Zero)) 157IntPtr.Zero, 176if (!Interop.Crypt32.CertAddCertificateLinkToStore(certStore, certContext, Interop.Crypt32.CertStoreAddDisposition.CERT_STORE_ADD_ALWAYS, IntPtr.Zero)) 196SafeCertStoreHandle certStore = Interop.crypt32.CertOpenStore(CertStoreProvider.CERT_STORE_PROV_SYSTEM_W, Interop.Crypt32.CertEncodingType.All, IntPtr.Zero, certStoreFlags, storeName); 210_ = Interop.Crypt32.CertControlStore(certStore, Interop.Crypt32.CertControlStoreFlags.None, Interop.Crypt32.CertControlStoreType.CERT_STORE_CTRL_AUTO_RESYNC, IntPtr.Zero);
System\Security\Cryptography\X509Certificates\X509Certificate.cs (1)
264public IntPtr Handle => Pal is null ? IntPtr.Zero : Pal.Handle;
System\Security\Cryptography\X509Certificates\X509CertificateLoader.Windows.cs (4)
194pdwMsgAndCertEncodingType: IntPtr.Zero, 196pdwFormatType: IntPtr.Zero, 197phCertStore: IntPtr.Zero, 198phMsg: IntPtr.Zero,
System\Security\Cryptography\X509Certificates\X509Chain.cs (2)
69return IntPtr.Zero; 110if (customCertificate == null || customCertificate.Handle == IntPtr.Zero)
System\Security\Cryptography\X509Certificates\X509Pal.Windows.GetCertContentType.cs (10)
30IntPtr.Zero, 32IntPtr.Zero, 33IntPtr.Zero, 34IntPtr.Zero, 35IntPtr.Zero)) 59IntPtr.Zero, 61IntPtr.Zero, 62IntPtr.Zero, 63IntPtr.Zero, 64IntPtr.Zero))
System\Security\Cryptography\X509Certificates\X509Pal.Windows.X500DistinguishedName.cs (6)
50if (!Interop.Crypt32.CertStrToName(Interop.Crypt32.CertEncodingType.All, distinguishedName, dwStrType, IntPtr.Zero, null, ref cbEncoded, IntPtr.Zero)) 54if (!Interop.Crypt32.CertStrToName(Interop.Crypt32.CertEncodingType.All, distinguishedName, dwStrType, IntPtr.Zero, encodedName, ref cbEncoded, IntPtr.Zero)) 72IntPtr.Zero, 90IntPtr.Zero,
System\Security\Cryptography\X509Certificates\X509Store.cs (1)
94return IntPtr.Zero;
System.Security.Cryptography.Pkcs (39)
Internal\Cryptography\Pal\Windows\DecryptorPalWindows.Decode.cs (3)
31hCryptMsg = Interop.Crypt32.CryptMsgOpenToDecode(MsgEncodingType.All, 0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
Internal\Cryptography\Pal\Windows\HelpersWindows.cs (3)
36if (!Interop.Crypt32.CryptMsgGetParam(hCryptMsg, paramType, index, IntPtr.Zero, ref cbData)) 53if (!Interop.Crypt32.CryptMsgGetParam(hCryptMsg, paramType, index, IntPtr.Zero, ref cbData)) 340if (!Interop.Crypt32.CryptMsgGetParam(hCryptMsg, CryptMsgParamType.CMSG_UNPROTECTED_ATTR_PARAM, 0, IntPtr.Zero, ref cbUnprotectedAttr))
Internal\Cryptography\Pal\Windows\PkcsPalWindows.cs (4)
31using (SafeCryptMsgHandle hCryptMsg = Interop.Crypt32.CryptMsgOpenToDecode(MsgEncodingType.All, 0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero)) 236IntPtr.Zero,
Internal\Cryptography\Pal\Windows\PkcsPalWindows.Encrypt.cs (11)
120SafeCryptMsgHandle hCryptMsg = Interop.Crypt32.CryptMsgOpenToEncode(MsgEncodingType.All, 0, CryptMsgType.CMSG_ENVELOPED, pEnvelopedEncodeInfo, innerContentType.Value!, IntPtr.Zero); 140pEnvelopedEncodeInfo->hCryptProv = IntPtr.Zero; 148pEnvelopedEncodeInfo->ContentEncryptionAlgorithm.Parameters.pbData = IntPtr.Zero; 154pEnvelopedEncodeInfo->rgpRecipients = IntPtr.Zero; 320pEncodeInfo->pvKeyEncryptionAuxInfo = IntPtr.Zero; 321pEncodeInfo->hCryptProv = IntPtr.Zero; 349pEncodeInfo->KeyEncryptionAlgorithm.Parameters.pbData = IntPtr.Zero; 362pEncodeInfo->KeyWrapAlgorithm.Parameters.pbData = IntPtr.Zero; 366pEncodeInfo->hCryptProv = IntPtr.Zero; 373pEncodeInfo->UserKeyingMaterial.pbData = IntPtr.Zero; 438return IntPtr.Zero;
Microsoft\Win32\SafeHandles\SafeCertContextHandle.cs (2)
26get { return handle == IntPtr.Zero; } 32SetHandle(IntPtr.Zero);
Microsoft\Win32\SafeHandles\SafeCryptMsgHandle.cs (3)
13base(IntPtr.Zero, ownsHandle: true) 19get { return handle == IntPtr.Zero; } 25SetHandle(IntPtr.Zero);
Microsoft\Win32\SafeHandles\SafeProvOrNCryptKeyHandle.cs (1)
30return handle == IntPtr.Zero;
Microsoft\Win32\SafeHandles\SafeProvOrNCryptKeyHandleUwp.cs (1)
43SetHandle(IntPtr.Zero);
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.CryptGetProvParam.cs (1)
61return CryptGetProvParam(safeProvHandle, dwParam, IntPtr.Zero, ref dwDataLen, 0);
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\SafeHashHandle.cs (1)
18SetHandle(IntPtr.Zero);
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\SafeKeyHandle.cs (1)
27SetHandle(IntPtr.Zero);
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\SafeProvHandle.cs (2)
22SetHandle(IntPtr.Zero); 121SetHandle(IntPtr.Zero);
src\runtime\src\libraries\Common\src\Interop\Windows\Crypt32\Interop.FindOidInfo.cs (2)
56IntPtr rawKey = IntPtr.Zero; 108if (rawKey != IntPtr.Zero)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (4)
33GetMessage(errorCode, IntPtr.Zero); 38if (moduleHandle != IntPtr.Zero) 47int length = FormatMessage(flags, moduleHandle, unchecked((uint)errorCode), 0, bufferPtr, stackBuffer.Length, IntPtr.Zero); 62int length = FormatMessage(flags | FORMAT_MESSAGE_ALLOCATE_BUFFER, moduleHandle, unchecked((uint)errorCode), 0, &nativeMsgPtr, 0, IntPtr.Zero);
System.Security.Cryptography.ProtectedData (11)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (4)
33GetMessage(errorCode, IntPtr.Zero); 38if (moduleHandle != IntPtr.Zero) 47int length = FormatMessage(flags, moduleHandle, unchecked((uint)errorCode), 0, bufferPtr, stackBuffer.Length, IntPtr.Zero); 62int length = FormatMessage(flags | FORMAT_MESSAGE_ALLOCATE_BUFFER, moduleHandle, unchecked((uint)errorCode), 0, &nativeMsgPtr, 0, IntPtr.Zero);
System\Security\Cryptography\ProtectedData.cs (7)
358Interop.Crypt32.CryptProtectData(in userDataBlob, null, ref optionalEntropyBlob, IntPtr.Zero, IntPtr.Zero, flags, out outputBlob) : 359Interop.Crypt32.CryptUnprotectData(in userDataBlob, IntPtr.Zero, ref optionalEntropyBlob, IntPtr.Zero, IntPtr.Zero, flags, out outputBlob); 375if (outputBlob.pbData == IntPtr.Zero) 402if (outputBlob.pbData != IntPtr.Zero)
System.Security.Principal.Windows (15)
Microsoft\Win32\SafeHandles\SafeAccessTokenHandle.cs (3)
15public SafeAccessTokenHandle() : base(IntPtr.Zero, true) { } 27return new SafeAccessTokenHandle(IntPtr.Zero); 35return handle == IntPtr.Zero || handle == new IntPtr(-1);
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.LsaLookupSids.cs (1)
42if (domainList.Domains != IntPtr.Zero)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeLocalAllocHandle.cs (1)
33return new SafeLocalAllocHandle(IntPtr.Zero);
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeLsaHandle.cs (2)
13: base(IntPtr.Zero, true) 27return handle == IntPtr.Zero;
System\Security\Principal\WindowsIdentity.cs (7)
79if (!identity._safeTokenHandle.IsInvalid && identity._safeTokenHandle.DangerousGetHandle() != IntPtr.Zero) 83if (!identity._safeTokenHandle.IsInvalid && identity._safeTokenHandle.DangerousGetHandle() != IntPtr.Zero) 183pKerbS4uLogin->ClientRealm.Buffer = IntPtr.Zero; 198IntPtr.Zero, 260if (accessToken == IntPtr.Zero) 269IntPtr.Zero, 486IntPtr.Zero,
System\Security\Principal\WindowsPrincipal.cs (1)
155IntPtr.Zero,
System.ServiceModel.Primitives (2)
System\IdentityModel\SecurityUtils.cs (1)
248return certificate != null && certificate.Handle != IntPtr.Zero;
System\ServiceModel\Security\SecurityUtils.cs (1)
1023return certificate != null && certificate.Handle != IntPtr.Zero;
System.ServiceProcess.ServiceController (7)
Microsoft\Win32\SafeHandles\SafeServiceHandle.cs (3)
14public SafeServiceHandle() : base(IntPtr.Zero, true) 18internal SafeServiceHandle(IntPtr handle) : base(IntPtr.Zero, true) 25get { return DangerousGetHandle() == IntPtr.Zero || DangerousGetHandle() == new IntPtr(-1); }
System\ServiceProcess\ServiceController.cs (4)
190bool result = Interop.Advapi32.EnumDependentServices(serviceHandle, Interop.Advapi32.ServiceState.SERVICE_STATE_ALL, IntPtr.Zero, 0, 305bool success = Interop.Advapi32.QueryServiceConfig(serviceHandle, IntPtr.Zero, 0, out int bytesNeeded); 389bool success = Interop.Advapi32.QueryServiceConfig(serviceHandle, IntPtr.Zero, 0, out int bytesNeeded); 754IntPtr.Zero,
System.Speech (24)
Internal\HGlobalSafeHandle.cs (4)
15public HGlobalSafeHandle() : base(IntPtr.Zero, true) 63return handle == IntPtr.Zero; 76if (handle != IntPtr.Zero) 86handle = IntPtr.Zero;
Internal\ObjectToken\RegistryDataKey.cs (1)
125IntPtr sapiTokenId = IntPtr.Zero;
Internal\SapiInterop\SapiGrammar.cs (1)
60return (SAPIErrorCodes)_sapiProxy.Invoke(delegate { return _sapiGrammar.SetRuleState(name, IntPtr.Zero, state); })!;
Internal\SapiInterop\SpStreamWrapper.cs (2)
50if (pcbRead != IntPtr.Zero) 65if (plibNewPosition != IntPtr.Zero)
Internal\Synthesis\AudioDeviceOut.cs (2)
40if (_deviceOpen && _hwo != IntPtr.Zero) 74result = Interop.WinMM.waveOutOpen(ref _hwo, _curDevice, wfx, _delegate, IntPtr.Zero, Interop.WinMM.CALLBACK_FUNCTION);
Internal\Synthesis\ConvertTextFrag.cs (2)
32sapiFrag.pNext = fFirst ? IntPtr.Zero : sapiFragLast.AddrOfPinnedObject(); 76sapiState.pPhoneIds = IntPtr.Zero;
Internal\Synthesis\TTSEngineProxy.cs (1)
130IntPtr coMem = IntPtr.Zero;
Internal\Synthesis\TTSVoice.cs (3)
93IntPtr waveFormat = IntPtr.Zero; 102waveFormat = _engine.GetOutputFormat(targetWaveFormat != null ? targetFormat.AddrOfPinnedObject() : IntPtr.Zero); 112if (waveFormat != IntPtr.Zero)
Internal\Synthesis\VoiceSynthesis.cs (2)
1618if (_iSite != IntPtr.Zero) 1693if (_iSite == IntPtr.Zero)
Internal\Synthesis\WaveHeader.cs (1)
78_waveHdr.lpNext = IntPtr.Zero;
Recognition\RecognizerBase.cs (5)
488_sapiContext.SetAudioOptions(SPAUDIOOPTIONS.SPAO_RETAIN_AUDIO, IntPtr.Zero, IntPtr.Zero); 2574IntPtr waveFormatPtr = IntPtr.Zero; 2583if (waveFormatPtr != IntPtr.Zero) 2603if (waveFormatPtr != 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.Threading.AccessControl (4)
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (4)
33GetMessage(errorCode, IntPtr.Zero); 38if (moduleHandle != IntPtr.Zero) 47int length = FormatMessage(flags, moduleHandle, unchecked((uint)errorCode), 0, bufferPtr, stackBuffer.Length, IntPtr.Zero); 62int length = FormatMessage(flags | FORMAT_MESSAGE_ALLOCATE_BUFFER, moduleHandle, unchecked((uint)errorCode), 0, &nativeMsgPtr, 0, IntPtr.Zero);
System.Transactions.Local (5)
System\Transactions\DtcProxyShim\DtcProxyShimFactory.cs (1)
184_transactionDispenser.BeginTransaction(IntPtr.Zero, isolationLevel, OletxTransactionIsoFlags.ISOFLAG_NONE, options, out ITransaction? pTx);
System\Transactions\DtcProxyShim\EnlistmentShim.cs (2)
72IntPtr.Zero, 73IntPtr.Zero);
System\Transactions\DtcProxyShim\TransactionShim.cs (1)
29=> Transaction.Abort(IntPtr.Zero, false, false);
System\Transactions\DtcProxyShim\VoterShim.cs (1)
26VoterBallotAsync2!.VoteRequestDone(voteHr, IntPtr.Zero);
System.Windows.Controls.Ribbon (7)
Microsoft\Windows\Controls\Ribbon\NativeMethods.cs (1)
355if (hDc == IntPtr.Zero)
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (1)
1576if (monitorPtr != IntPtr.Zero)
Microsoft\Windows\Controls\Ribbon\RibbonDropDownHelper.cs (1)
168if (monitor != IntPtr.Zero)
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (4)
997if (hwnd != IntPtr.Zero) 1020IntPtr capturedHwnd = IntPtr.Zero; 1027if (capturedHwnd != IntPtr.Zero && 1042(capturedHwnd == IntPtr.Zero ||
System.Windows.Extensions (28)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeCertContextHandle.cs (2)
47SetHandle(IntPtr.Zero); 60SetHandle(IntPtr.Zero);
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeCrypt32Handle.cs (2)
15: base(IntPtr.Zero, true) 21get { return handle == IntPtr.Zero; }
System\Media\SoundPlayer.cs (6)
227Interop.WinMM.PlaySound(localPath, IntPtr.Zero, Interop.WinMM.SND_NODEFAULT | flags); 234Interop.WinMM.PlaySound(_streamData, IntPtr.Zero, Interop.WinMM.SND_MEMORY | Interop.WinMM.SND_NODEFAULT | flags); 428Interop.WinMM.PlaySound((byte[]?)null, IntPtr.Zero, Interop.WinMM.SND_PURGE); 541IntPtr hMIO = Interop.WinMM.mmioOpen(fileName, IntPtr.Zero, Interop.WinMM.MMIO_READ | Interop.WinMM.MMIO_ALLOCBUF); 542if (hMIO == IntPtr.Zero) 611if (hMIO != IntPtr.Zero)
System\Security\Cryptography\X509Certificates\X509Certificate2UI.cs (14)
25DisplayX509Certificate(certificate, IntPtr.Zero); 37return SelectFromCollectionHelper(certificates, title, message, selectionFlag, IntPtr.Zero); 65ViewInfo.rgszPurposes = IntPtr.Zero; 67ViewInfo.pCryptProviderData = IntPtr.Zero; 74ViewInfo.rghStores = IntPtr.Zero; 76ViewInfo.rgPropSheetPages = IntPtr.Zero; 80if (!Interop.CryptUI.CryptUIDlgViewCertificateW(ViewInfo, IntPtr.Zero)) 111IntPtr.Zero, 113IntPtr.Zero); 139csc.pFilterCallback = IntPtr.Zero; 140csc.pDisplayCallback = IntPtr.Zero; 141csc.pvCallbackData = IntPtr.Zero; 146csc.rghStores = IntPtr.Zero; 148csc.rgPropSheetPages = IntPtr.Zero;
System\Security\Cryptography\X509Certificates\X509Utils.cs (4)
30IntPtr.Zero, 32IntPtr.Zero); 64IntPtr pEnumContext = Interop.Crypt32.CertEnumCertificatesInStore(safeCertStoreHandle, IntPtr.Zero); 65while (pEnumContext != IntPtr.Zero)
System.Windows.Forms (113)
System\Windows\Forms\ActiveX\AxHost.cs (3)
110private IntPtr _wndprocAddr = IntPtr.Zero; 1241if (!IsHandleCreated || _wndprocAddr == IntPtr.Zero) 3444_wndprocAddr = IntPtr.Zero;
System\Windows\Forms\Control.cs (9)
1419cp.Parent = _parent is null ? IntPtr.Zero : _parent.InternalHandle; 1424cp.Parent = IntPtr.Zero; 1446if (cp.Parent == IntPtr.Zero && IsActiveX) 4598if (cp.Parent == IntPtr.Zero && (cp.Style & (int)WINDOW_STYLE.WS_CHILD) != 0) 7524controlAccObj.Handle = IntPtr.Zero; 7532nonClientAccessibleObject.Handle = IntPtr.Zero; 9296if (_window.Handle == IntPtr.Zero) 9355if (PInvoke.SetParent(this, parentHandle) == IntPtr.Zero) 10252if (value == IntPtr.Zero)
System\Windows\Forms\Control.Ime.cs (10)
698HIMC oldContext = PInvoke.ImmAssociateContext((HWND)handle, (HIMC)IntPtr.Zero); 699if (oldContext != IntPtr.Zero) 715if (inputContext == IntPtr.Zero) 717if (s_originalImeContext == IntPtr.Zero) 720if (inputContext != IntPtr.Zero) 748HIMC inputContext = (HIMC)IntPtr.Zero; 762if (inputContext == IntPtr.Zero) 808if (inputContext != IntPtr.Zero) 825if (inputContext != IntPtr.Zero) 934if (inputContext != IntPtr.Zero)
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
1504if (handle != IntPtr.Zero)
System\Windows\Forms\Controls\ListView\ListView.cs (7)
4111IntPtr hGlobalColumns = IntPtr.Zero; 4146Debug.Assert(result != IntPtr.Zero, "Groups not enabled"); 4148Debug.Assert(result != IntPtr.Zero, $"Doesn't contain group id: {lvItem.iGroupId}"); 4153if (lvItem.cColumns > maxColumns || hGlobalColumns == IntPtr.Zero) 4155if (hGlobalColumns != IntPtr.Zero) 4233if (hGlobalColumns != IntPtr.Zero) 5278if (result == IntPtr.Zero)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridToolTip.cs (1)
87Parent = IntPtr.Zero,
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (2)
257if (s_moduleHandle == IntPtr.Zero) 2085if (txrg.lpstrText != IntPtr.Zero)
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
475IntPtr handle = (value is not null) ? value.Handle : IntPtr.Zero;
System\Windows\Forms\Controls\TabControl\TabPage.TabAccessibleObject.cs (1)
71? (int)IntPtr.Zero
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
1073if (inputContext != IntPtr.Zero)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
673if (_dropDownOwnerWindow.Handle == IntPtr.Zero) 1744if (_hwndThatLostFocus == IntPtr.Zero)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (1)
86if (_activeHwnd.Handle != IntPtr.Zero)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.HostedWindowsFormsMessageHook.cs (3)
33_messageHookHandle == IntPtr.Zero, 72if (_messageHookHandle != IntPtr.Zero) 77Debug.Assert(_messageHookHandle != IntPtr.Zero, "Failed to install mouse hook");
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (2)
585if (_nativeMenuCommandID == -1 || _nativeMenuHandle == IntPtr.Zero) 605if (_nativeMenuCommandID == -1 || _nativeMenuHandle == IntPtr.Zero)
System\Windows\Forms\Controls\TreeView\TreeNode.cs (9)
294if (HTREEITEMInternal == IntPtr.Zero) 328if (HTREEITEMInternal != IntPtr.Zero && _treeView is not null && !_treeView.IsDisposed) 484if (HTREEITEMInternal == IntPtr.Zero && TreeView is not null) 613if (HTREEITEMInternal == IntPtr.Zero) 954if (HTREEITEMInternal == IntPtr.Zero) 1277if (HTREEITEMInternal != IntPtr.Zero) 1980if (HTREEITEMInternal != IntPtr.Zero) 1988HTREEITEMInternal = (HTREEITEM)IntPtr.Zero; 2125if (HTREEITEMInternal == IntPtr.Zero)
System\Windows\Forms\Controls\TreeView\TreeNodeCollection.cs (2)
300if (node.HTREEITEMInternal != IntPtr.Zero) 436if (node.HTREEITEMInternal != IntPtr.Zero)
System\Windows\Forms\Controls\TreeView\TreeView.cs (17)
1091if (hItem == IntPtr.Zero) 1304return (hitem == IntPtr.Zero ? null : NodeFromHandle(hitem)); 1691IntPtr handle = (ImageList is null) ? IntPtr.Zero : ImageList.Handle; 1744IntPtr handle = IntPtr.Zero; 1999if ((handleOld != IntPtr.Zero) && (handleOld != handle)) 2010if (handle != IntPtr.Zero) 2416if (item.hItem == IntPtr.Zero) 2431if (item.hItem == IntPtr.Zero) 2456if (item.hItem == IntPtr.Zero) 2485if (nmtv->itemNew.hItem == IntPtr.Zero) 2518if (nmtv->itemNew.hItem != IntPtr.Zero) 2539if (nmtv->itemOld.hItem != IntPtr.Zero) 2551if (nmtvdi.item.hItem == IntPtr.Zero) 2553return (LRESULT)IntPtr.Zero; 2580if (nmtvdi.item.hItem == IntPtr.Zero) 3184if (item->hItem != IntPtr.Zero) 3339_mouseDownNode = IntPtr.Zero;
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
581internal IntPtr GetHandleNoCreate() => IsHandleCreated ? Handle : IntPtr.Zero;
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (2)
87return IntPtr.Zero; 143return IntPtr.Zero;
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (2)
496return IntPtr.Zero; 573return IntPtr.Zero;
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (13)
204/// Gets the window handle of the task dialog window, or <see cref="IntPtr.Zero"/> 228internal bool IsShown => _instanceHandlePtr != IntPtr.Zero; 243internal bool IsHandleCreated => _handle != IntPtr.Zero; 329=> ShowDialogAsync(IntPtr.Zero, page.OrThrowIfNull(), startupLocation); 371/// The handle of the owner window, or <see cref="IntPtr.Zero"/> to show a modeless dialog. 458=> ShowDialog(IntPtr.Zero, page.OrThrowIfNull(), startupLocation); 500/// The handle of the owner window, or <see cref="IntPtr.Zero"/> to show a 650Debug.Assert(_handle == IntPtr.Zero); 690_instanceHandlePtr = IntPtr.Zero; 1154_boundPage.Expander!.HandleExpandoButtonClicked((nint)wParam != IntPtr.Zero); 1158_boundPage.Verification!.HandleCheckBoxClicked((nint)wParam != IntPtr.Zero); 1289IntPtr.Zero, 1621if (Handle == IntPtr.Zero)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogIcon.cs (1)
138/// <param name="iconHandle">A handle to an instance of an icon, or <see cref="IntPtr.Zero"/> to not show an icon.</param>
System\Windows\Forms\Form.cs (2)
2009if (_ownerWindow.Handle == IntPtr.Zero) 4712if (_ctlClient is not null && _ctlClient.Handle != IntPtr.Zero &&
System\Windows\Forms\MDI\MDIClient.cs (3)
140if (Handle == IntPtr.Zero) 169if (site is not null && site.DesignMode && Handle != IntPtr.Zero) 329if (ParentInternal is not null && ParentInternal.Site is not null && ParentInternal.Site.DesignMode && Handle != IntPtr.Zero)
System\Windows\Forms\NativeWindow.cs (3)
555=> handle != IntPtr.Zero ? GetWindowFromTable((HWND)handle) : null; 567/// <see cref="IntPtr.Zero"/>. 609Debug.Assert(DefaultWindowProc != IntPtr.Zero, "We have active windows but no user window proc?");
System\Windows\Forms\NotifyIcon.cs (2)
573if (_window.Handle == IntPtr.Zero) 646if (_window.Handle == IntPtr.Zero)
System\Windows\Forms\Rendering\ControlPaint.cs (1)
1502IntPtr.Zero);
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (1)
161IntPtr IDeviceContext.GetHdc() => Graphics?.GetHdc() ?? IntPtr.Zero;
System\Windows\Forms\Rendering\PaintEventArgs.cs (1)
134IntPtr IDeviceContext.GetHdc() => Graphics?.GetHdc() ?? IntPtr.Zero;
System\Windows\Forms\Rendering\ScreenDcCache.cs (4)
48item = Interlocked.Exchange(ref _itemsCache[i], IntPtr.Zero); 49if (item != IntPtr.Zero) 73if (temp == IntPtr.Zero) 90if (hdc != IntPtr.Zero)
System\Windows\Forms\Rendering\TextRenderer.cs (1)
637|| graphics.Clip.GetHrgn(graphics) == IntPtr.Zero,
System\Windows\Forms\ToolTip\ToolTip.cs (3)
841if (result == IntPtr.Zero) 971internal bool GetHandleCreated() => _window is not null && _window.Handle != IntPtr.Zero; 1797if (toolInfo.SendMessage(this, PInvoke.TTM_GETTOOLINFOW) != IntPtr.Zero)
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (1)
61supported = hTheme != IntPtr.Zero;
System.Windows.Forms.Design (11)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (1)
157PInvokeCore.SetWindowLong(this, WINDOW_LONG_PTR_INDEX.GWL_HWNDPARENT, IntPtr.Zero);
System\Drawing\Design\ColorEditor.CustomColorDialog.cs (3)
36Debug.Assert(_hInstance != IntPtr.Zero, "Dialog has been disposed"); 47if (_hInstance != IntPtr.Zero) 50_hInstance = IntPtr.Zero;
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (3)
175return _behaviorServiceTarget.MapAdornerWindowPoint(IntPtr.Zero, pt); 188return _behaviorServiceSource.MapAdornerWindowPoint(IntPtr.Zero, pt); 692controlRect.Location = _behaviorServiceTarget.MapAdornerWindowPoint(IntPtr.Zero, controlRect.Location);
System\Windows\Forms\Design\ControlDesigner.ChildWindowTarget.cs (1)
79Debug.Assert(_handle != IntPtr.Zero, "Handle for control not created");
System\Windows\Forms\Design\ControlDesigner.DesignerWindowTarget.cs (1)
38if (newHandle != IntPtr.Zero)
System\Windows\Forms\Design\RichTextBoxDesigner.cs (1)
31if (control is not null && control.Handle != IntPtr.Zero)
System\Windows\Forms\Design\ToolStripInSituService.cs (1)
203IntPtr hWnd = IntPtr.Zero;
System.Windows.Forms.Primitives (5)
Microsoft\Win32\SafeHandles\CoTaskMemSafeHandle.cs (3)
10internal CoTaskMemSafeHandle() : base(IntPtr.Zero, true) 14public override bool IsInvalid => IsClosed || handle == IntPtr.Zero; 19handle = IntPtr.Zero;
System\Windows\Forms\Internals\ScaleHelper.DpiAwarenessScope.cs (1)
83&& PInvoke.SetThreadDpiAwarenessContext(_originalDpiAwarenessContext) == IntPtr.Zero)
Windows\Win32\PInvoke.LoadLibrary.cs (1)
40/// <returns>A handle to the loaded module, if successful; <see cref="IntPtr.Zero"/> otherwise.</returns>
UIAutomationClient (62)
MS\Internal\Automation\Accessible.cs (3)
57if (_hwnd == IntPtr.Zero) 63_hwnd = IntPtr.Zero; 71_hwnd = IntPtr.Zero;
MS\Internal\Automation\BoundingRectTracker.cs (1)
45if ( hwnd == IntPtr.Zero || idObject != UnsafeNativeMethods.OBJID_WINDOW )
MS\Internal\Automation\ClickablePoint.cs (1)
33if (SafeNativeMethods.MonitorFromRect( ref winRect, SafeNativeMethods.MONITOR_DEFAULTTONULL ) == IntPtr.Zero)
MS\Internal\Automation\FocusTracker.cs (6)
47if (hwnd != IntPtr.Zero) 80if (hwnd != IntPtr.Zero) 253if (hwndCur == IntPtr.Zero || !SafeNativeMethods.IsWindow(NativeMethods.HWND.Cast(hwndCur))) 269HandleFocusChange(IntPtr.Zero, null, 0, 0, eventTime); 293IntPtr i = Misc.SendMessageTimeout(NativeMethods.HWND.Cast(hwnd), UnsafeNativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero);
MS\Internal\Automation\HwndProxyElementProvider.cs (19)
116IntPtr len = Misc.SendMessageTimeout( _hwnd, UnsafeNativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero ); 126if (Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETTEXT, new IntPtr(ilen + 1), str) == IntPtr.Zero) 344if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_MINIMIZE, IntPtr.Zero)) 365if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_MAXIMIZE, IntPtr.Zero)) 387if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_CLOSE, IntPtr.Zero)) 572IntPtr ret = UnsafeNativeMethods.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero, UnsafeNativeMethods.SMTO_ABORTIFHUNG, 0, out dwResult); 573if ( ret == IntPtr.Zero ) 794Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETMINMAXINFO, IntPtr.Zero, ref minMaxInfo); 861if (hmenu != IntPtr.Zero) 906if (hmenu != IntPtr.Zero) 994if (GetMenuBarInfo(_hwnd, UnsafeNativeMethods.OBJID_SYSMENU, 0, out mbi) && mbi.hMenu != IntPtr.Zero) 999return IntPtr.Zero; 1720if (hrgn == IntPtr.Zero) 1816IntPtr lr = Misc.SendMessageTimeout( hChild, UnsafeNativeMethods.WM_NCHITTEST, IntPtr.Zero, MAKELPARAM( (int)x, (int)y ) ); 1993if (parent == IntPtr.Zero) 1997IntPtr lresult = Misc.SendMessageTimeout(parent, UnsafeNativeMethods.WM_MDIACTIVATE, (IntPtr)hwnd, IntPtr.Zero); 1998return lresult == IntPtr.Zero;
MS\Internal\Automation\MenuTracker.cs (1)
56if( hwnd == IntPtr.Zero )
MS\Internal\Automation\Misc.cs (8)
274if (result == IntPtr.Zero) 398IntPtr result = IntPtr.Zero; 416if ((result == IntPtr.Zero) && (error != 0)) 517if (processHandle == IntPtr.Zero 532if (processHandle == IntPtr.Zero) 588if (smtoRetVal == IntPtr.Zero) 605if (smtoRetVal == IntPtr.Zero) 622if (smtoRetVal == IntPtr.Zero)
MS\Internal\Automation\ProxyManager.cs (1)
791IntPtr result = Misc.SendMessageTimeout(hwnd, UnsafeNativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX);
MS\Internal\Automation\SafeHandles.cs (6)
20: base(IntPtr.Zero, true) 28get { return handle == IntPtr.Zero; } 44: base(IntPtr.Zero, true) 51get { return handle == IntPtr.Zero; } 65: base(IntPtr.Zero, true) 71get { return handle == IntPtr.Zero; }
MS\Internal\Automation\UiaCoreApi.cs (2)
161if (_pProperties != IntPtr.Zero) 619if (pInts == IntPtr.Zero)
MS\Internal\Automation\WindowHideOrCloseTracker.cs (1)
55if (hwnd == IntPtr.Zero)
MS\Internal\Automation\WindowInteractionStateTracker.cs (1)
52if (hwnd == IntPtr.Zero)
MS\Internal\Automation\WindowShowOrOpenTracker.cs (1)
55if (hwnd == IntPtr.Zero)
MS\Internal\Automation\WindowVisualStateTracker.cs (1)
52if (hwnd == IntPtr.Zero)
MS\Internal\Automation\WinEventWrap.cs (4)
109_hHooks[i] = UnsafeNativeMethods.SetWinEventHook(eventId, eventId, IntPtr.Zero, _winEventProc, 0, 0, _fFlags); 110if (_hHooks[i] == IntPtr.Zero) 129if (_hHooks[i] != IntPtr.Zero) 134_hHooks[i] = IntPtr.Zero;
MS\Win32\NativeMethods.cs (1)
55h = IntPtr.Zero
System\Windows\Automation\AutomationElement.cs (1)
424Misc.ValidateArgument(hwnd != IntPtr.Zero, nameof(SR.HwndMustBeNonNULL));
System\Windows\Automation\Condition.cs (2)
15: base(IntPtr.Zero, true) 23get { return handle == IntPtr.Zero; }
System\Windows\Automation\Text\TextRange.cs (2)
22: base(IntPtr.Zero, true) 29get { return handle == IntPtr.Zero; }
UIAutomationClientSideProviders (647)
MS\Internal\AutomationProxies\Accessible.cs (6)
157IntPtr wParam = IntPtr.Zero; 163if (lResult == IntPtr.Zero) 440bool inSameHwnd = Window != IntPtr.Zero && Window == hwnd; 836if (_hwnd == IntPtr.Zero) 843_hwnd = IntPtr.Zero; 855_hwnd = IntPtr.Zero;
MS\Internal\AutomationProxies\ClickablePoint.cs (7)
20_hwndProgman = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Progman", null); 21if (_hwndProgman == IntPtr.Zero) 60for (hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); hwnd != IntPtr.Zero; hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDNEXT)) 75if (hwnd == IntPtr.Zero) 94if (hwnd == IntPtr.Zero) 259int lr = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\CommonGetThemePartSize.cs (4)
28_hTheme = new SafeThemeHandle(IntPtr.Zero, false); 58fSuccess = GetThemePartSize(_hTheme, IntPtr.Zero, iPartId, iStateId, IntPtr.Zero, (int)THEMESIZE.TS_TRUE, &size) == IntPtr.Zero;
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (1)
42SetHandle(Misc.VirtualAllocEx(_processHandle, IntPtr.Zero, new UIntPtr((uint)cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE));
MS\Internal\AutomationProxies\CommonXSendMessage.cs (55)
109if (!ignoreSendResult && result == IntPtr.Zero) 139if (IsWOW64Process(IntPtr.Zero)) 195if (Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address) == IntPtr.Zero) 239if ((errorCode != ErrorValue.NoCheck) && ((errorCode == ErrorValue.Zero && res == IntPtr.Zero) || (errorCode == ErrorValue.NotZero && res != IntPtr.Zero))) 286if ((errorCode != ErrorValue.NoCheck) && ((errorCode == ErrorValue.Zero && res == IntPtr.Zero) || (errorCode == ErrorValue.NotZero && res != IntPtr.Zero))) 342if ((errorCode != ErrorValue.NoCheck) && ((errorCode == ErrorValue.Zero && res == IntPtr.Zero) || (errorCode == ErrorValue.NotZero && res != IntPtr.Zero))) 408return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 414return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, 423return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 465return XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()), XSendMessage.ErrorValue.NoCheck); 472bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), XSendMessage.ErrorValue.NoCheck); 484bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), XSendMessage.ErrorValue.NoCheck); 667IntPtr textAddress = IntPtr.Zero; 915return XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 922bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 935bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 956return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType())); 962return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 968return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 978IntPtr hitTestItem = IntPtr.Zero; 983if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref clientPoint, 1)) 989if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo), 998if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo32), 1007if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo64), 1027return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 1034hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), 1042return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1190Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2); 1256if (Misc.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero) 1353if (group.pszHeader != IntPtr.Zero) 1622pszText = IntPtr.Zero, 1723pszText = IntPtr.Zero, 1724hbm = IntPtr.Zero, 1731pvFilter = IntPtr.Zero 1829pszText = IntPtr.Zero, 1948pszText = IntPtr.Zero, 1955puColumns = IntPtr.Zero 2148pszHeader = IntPtr.Zero, 2150pszFooter = IntPtr.Zero, 2232pszHeader = IntPtr.Zero, 2234pszFooter = IntPtr.Zero, 2242pszSubtitle = IntPtr.Zero, 2244pszTask = IntPtr.Zero, 2246pszDescriptionTop = IntPtr.Zero, 2248pszDescriptionBottom = IntPtr.Zero, 2254pszSubsetTitle = IntPtr.Zero, // NULL if group is not subset 2345iString = IntPtr.Zero 2445hItem = IntPtr.Zero, 2448pszText = IntPtr.Zero, 2593hwnd = IntPtr.Zero, 2596hinst = IntPtr.Zero, 2597pszText = IntPtr.Zero,
MS\Internal\AutomationProxies\EventManager.cs (1)
581private static IntPtr _hwndLast = IntPtr.Zero;
MS\Internal\AutomationProxies\Misc.cs (44)
178if (result == IntPtr.Zero) 207if (label == IntPtr.Zero) 237if (!MapWindowPoints(hwnd, IntPtr.Zero, ref leftTop, 1)) 243if (!MapWindowPoints(hwnd, IntPtr.Zero, ref rightBottom, 1)) 303if (hdc == IntPtr.Zero) 315return ProxyGetGUIThreadInfo(0, out gui) ? gui.hwndFocus : IntPtr.Zero; 320if (hwndToolTip != IntPtr.Zero) 373return IntPtr.Zero; 378if (hwndParent == IntPtr.Zero || hwndParent == UnsafeNativeMethods.GetDesktopWindow()) 380return IntPtr.Zero; 386while ((peer = NativeMethodsSetLastError.GetWindow(peer, NativeMethods.GW_HWNDPREV)) != IntPtr.Zero) 391int code = Misc.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero); 419return IntPtr.Zero; 506if (hwndParent == IntPtr.Zero) 569IntPtr memAddr = IntPtr.Zero; // Ptr to remote mem 578memAddr = VirtualAlloc(IntPtr.Zero, new UIntPtr(cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE); 584if (ProxySendMessage(hwnd, uMsg, wParam, memAddr) == IntPtr.Zero) 605if (memAddr != IntPtr.Zero) 617if (resultHwnd == IntPtr.Zero) 752if (hwnd == IntPtr.Zero) 865while (hwnd != IntPtr.Zero) 898if ((IsProgmanWindow(hWndFrom) && hWndTo == IntPtr.Zero) || 899(hWndFrom == IntPtr.Zero && IsProgmanWindow(hWndTo))) 923if ((IsProgmanWindow(hWndFrom) && hWndTo == IntPtr.Zero) || 924(hWndFrom == IntPtr.Zero && IsProgmanWindow(hWndTo))) 1018if (processHandle == IntPtr.Zero 1034if (processHandle == IntPtr.Zero) 1062int index = ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 1196IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, NativeMethods.WM_GETTITLEBARINFOEX, IntPtr.Zero, ref ti, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1198if (resultSendMessage == IntPtr.Zero) 1254if (resultSendMessage == IntPtr.Zero) 1282if (resultSendMessage == IntPtr.Zero) 1308if (resultSendMessage == IntPtr.Zero) 1334if (resultSendMessage == IntPtr.Zero) 1349if (resultSendMessage == IntPtr.Zero) 1524if (RegisterHotKey(IntPtr.Zero, atom, 0, vk)) 1572if (!GetMessage(ref msg, IntPtr.Zero, 0, 0)) 1590UnregisterHotKey(IntPtr.Zero, atom); 1747if (result == IntPtr.Zero) 1760if (result == IntPtr.Zero) 1842if (hwndShell == IntPtr.Zero) 1855int commonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\MSAANativeProvider.cs (3)
52Debug.Assert(hwnd != IntPtr.Zero); 157int index = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 1077Debug.Assert(_hwnd != IntPtr.Zero);
MS\Internal\AutomationProxies\MSAAWinEventWrap.cs (4)
79_hHooks[0] = Misc.SetWinEventHook(_eventMin, _eventMax, IntPtr.Zero, _winEventProc, 0, 0, _fFlags); 80if (_hHooks[0] == IntPtr.Zero) 97if (_hHooks[i] != IntPtr.Zero) 100_hHooks[i] = IntPtr.Zero;
MS\Internal\AutomationProxies\NonClientArea.cs (3)
144if (menu == IntPtr.Zero) 208int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 539if (menu != IntPtr.Zero)
MS\Internal\AutomationProxies\ProxyHwnd.cs (7)
212if (_controlLabel == IntPtr.Zero && name != null && GetParent() == null) 220if (_controlLabel != IntPtr.Zero) 236if (hwndParent != IntPtr.Zero && hwndParent != UnsafeNativeMethods.GetDesktopWindow()) 260string text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, idChild); 263text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, 0); 472if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 495if (label != IntPtr.Zero)
MS\Internal\AutomationProxies\ProxySimple.cs (3)
91if (_hwnd == IntPtr.Zero) 165if (_hwnd == IntPtr.Zero || (GetParent() != null && GetParent()._hwnd == _hwnd)) 329return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero;
MS\Internal\AutomationProxies\QueueProcessor.cs (1)
102while (UnsafeNativeMethods.PeekMessage (ref msg, IntPtr.Zero, 0, 0, NativeMethods.PM_REMOVE))
MS\Internal\AutomationProxies\SafeProcessHandle.cs (1)
21if (hwnd == IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsAltTab.cs (2)
126if (Misc.MapWindowPoints(System.IntPtr.Zero, _hwnd, ref pt, 1)) 386if(!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (17)
190int state = Misc.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero); 317if (hwndRadioButton == IntPtr.Zero || 390if (hwndParent != IntPtr.Zero && WindowsFormsHelper.IsWindowsFormsControl(hwndParent)) 494Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero); 508Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true); 515Misc.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true); 537IntPtr hwndShell = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Shell_TrayWnd", null); 538if (hwndShell != IntPtr.Zero) 562if (hwndParent != IntPtr.Zero) 581if (hwndParent != IntPtr.Zero) 610} while (hwndParent != _hwndDesktop && hwndParent != IntPtr.Zero); 640int state = Misc.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero); 707return IntPtr.Zero;
MS\Internal\AutomationProxies\WindowsComboBox.cs (24)
254if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2)) 300if (cbInfo.hwndItem != IntPtr.Zero && IsEditableCombo()) 315if (cbInfo.hwndList != IntPtr.Zero) 336if (cbInfo.hwndItem != IntPtr.Zero && IsEditableCombo()) 351if (cbInfo.hwndList != IntPtr.Zero) 383if (hwndParent != IntPtr.Zero) 505if ((IntPtr.Zero != hwndEx) && IsComboEx (hwndEx)) 510return IntPtr.Zero; 525cbInfo.hwndItem = IntPtr.Zero; 531if (cbInfo.hwndItem == IntPtr.Zero && IsComboEx (NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT))) 533cbInfo.hwndItem = Misc.FindWindowEx(hwnd, IntPtr.Zero, "EDIT", null); 534if (cbInfo.hwndItem != IntPtr.Zero) 555return Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0; 570Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 575Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 651if (GetComboInfo(_hwnd, ref cbInfo) && (IntPtr.Zero != cbInfo.hwndList)) 667if (hwndEx == IntPtr.Zero) 691index = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 698int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 787if (hwndCombo != IntPtr.Zero) 833return _hwndEx != IntPtr.Zero; 913if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2))
MS\Internal\AutomationProxies\WindowsContainer.cs (4)
143hwndTab = IntPtr.Zero; 173if (hwndParent == IntPtr.Zero) 178hwndTab = Misc.FindWindowEx(hwndParent, IntPtr.Zero, "SysTabControl32", null); 180if (hwndTab == IntPtr.Zero || !SafeNativeMethods.IsWindowVisible(hwndTab))
MS\Internal\AutomationProxies\WindowsEditBox.cs (33)
105if (hwndParent != IntPtr.Zero) 149hwnd != IntPtr.Zero && string.IsNullOrEmpty(accessKey); 217if (hwndUpDown != IntPtr.Zero) 228if (hwndUpDown != IntPtr.Zero) 239if (hwndUpDown != IntPtr.Zero) 289int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 297result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 351if (!Misc.MapWindowPoints(IntPtr.Zero, WindowHandle, ref clientLocation, 1)) 443int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam); 515return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 522return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 528IntPtr result = Misc.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero); 534if (result == IntPtr.Zero) 545return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero); 551Debug.Assert(hfont != IntPtr.Zero, "WindowsEditBox.GetLogfont got null HFONT"); 565Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect); 585return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero); 680return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero); 686int index = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero); 742int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero); 853if (hdc == IntPtr.Zero) 858IntPtr oldFont = IntPtr.Zero; 867if (oldFont != IntPtr.Zero) 892if (hwndParent == IntPtr.Zero) 912if (hwndParent != IntPtr.Zero) 928if (hwndParent != IntPtr.Zero) 944if (hwndParent != IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (4)
241if (!Misc.MapWindowPoints(_provider.WindowHandle, IntPtr.Zero, ref w32point, 1)) 769IntPtr hdc = Misc.GetDC(IntPtr.Zero); 770if (hdc == IntPtr.Zero) 775Misc.ReleaseDC(IntPtr.Zero, hdc);
MS\Internal\AutomationProxies\WindowsGrip.cs (2)
107int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 115int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsHyperlink.cs (7)
196if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 211bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 276return XSendMessage.XSend(_hwnd, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM)); 395return XSendMessage.XSend(_hwnd, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType())); 492bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 504Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 505Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (5)
137Misc.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4)); 187if (hwndChild != IntPtr.Zero) 243while (hwndChild != IntPtr.Zero) 260for (int i = 0; ((i < index) && (hwndChild != IntPtr.Zero)); i++) 380Misc.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
MS\Internal\AutomationProxies\WindowsListBox.cs (23)
77if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && (cbInfo.hwndCombo != IntPtr.Zero)) 290int ret = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top)); 305int index = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero); 380return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0; 430return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero); 522if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && (cbInfo.hwndCombo != IntPtr.Zero)) 555int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero); 596return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 719int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 932Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 978return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 991SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 1031return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item; 1035return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1053return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty; 1126Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1156Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1180return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (26)
495if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 524if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 789if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 1207return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1246return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero); 1271return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1281return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0; 1345return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1369IntPtr partialVisible = (partialOK) ? IntPtr.Zero : new IntPtr (1); 1377return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero); 1410if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref hitTest.pt, 1)) 1420result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1429result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1448return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1495return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1504IntPtr hwndToolTip = Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1794return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref pt, 1); 1804return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero); 1831if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader))
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (4)
328int groupIndex = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 486int groupIndex = (int)Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (3)
240return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 466XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPMETRICS, IntPtr.Zero, new IntPtr(&(metric.cbSize)), metric.cbSize, XSendMessage.ErrorValue.NoCheck); 705Misc.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)
135if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRectangle, 2)) 365int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero); 689if (hwndHeader == IntPtr.Zero) 762if (IntPtr.Zero == hwndEdit) 850if (hwndHeader != IntPtr.Zero) 929if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1))
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (3)
79if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 249if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 253Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (3)
170while (ancestor != IntPtr.Zero && ancestor != desktop) 374int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (67)
65if (!_expandedMenus.Contains(IntPtr.Zero)) 67_expandedMenus[IntPtr.Zero] = new MenuParentInfo(hwnd, item, type); 163if (hmenu == IntPtr.Zero) 166if (hmenu == IntPtr.Zero) 196if (hSysMenu != IntPtr.Zero) 230IntPtr hwndPopup = IntPtr.Zero; 233hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 234if (hwndPopup == IntPtr.Zero) 243if (hwndPopup != IntPtr.Zero) 250if (hmenu == IntPtr.Zero) 264if (hSubMenu == IntPtr.Zero) 272if (hwndSubMenuPopup == IntPtr.Zero) 459WinEventTracker.AddToNotificationList(IntPtr.Zero, new WinEventTracker.ProxyRaiseEvents(MenuEvents), _menuEvents); 480WinEventTracker.RemoveToNotificationList(IntPtr.Zero, _menuEvents, new WinEventTracker.ProxyRaiseEvents(MenuEvents)); 529IntPtr menuParent = IntPtr.Zero; 530IntPtr hwndParent = IntPtr.Zero; 533if (menu == IntPtr.Zero) 574hwndParent = IntPtr.Zero; 575menuParent = IntPtr.Zero; 579if (hMenu == IntPtr.Zero) 597if (hMenuPossibleParent != IntPtr.Zero) 613for (IntPtr hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndMenu, WindowsMenu.MenuClassName, null); 614hwndPossibleParent != IntPtr.Zero; 615hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndPossibleParent, WindowsMenu.MenuClassName, null)) 620if (hMenuPossibleParent != IntPtr.Zero) 641for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 642hwndSubMenu != IntPtr.Zero; 643hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, MenuClassName, null)) 656return IntPtr.Zero; 668if (IntPtr.Zero != Misc.GetWindow(hwnd, NativeMethods.GW_OWNER)) 716return Misc.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero); 719return IntPtr.Zero; 746if (GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi) && mbi.hMenu != IntPtr.Zero) 751return IntPtr.Zero; 878mbi.hMenu != IntPtr.Zero && 884return IntPtr.Zero; 890if (hmenu == IntPtr.Zero) 930IntPtr hwndPopup = IntPtr.Zero; 933hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 934if (hwndPopup == IntPtr.Zero) 944return IntPtr.Zero; 1006if (parent == null && _expandedMenus.Contains(IntPtr.Zero)) 1009parentInfo = (MenuParentInfo)_expandedMenus[IntPtr.Zero]; 1415return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero; 1444if (hwndFocus != IntPtr.Zero && hwndFocus != _hwnd) 1598if (submenu == IntPtr.Zero) 1605if (hwndSubmenu != IntPtr.Zero) 1617if (submenu == IntPtr.Zero) 1624if (hwndSubmenu != IntPtr.Zero) 1894return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero); 1950if (menuItemInfo.hSubMenu != IntPtr.Zero) 1977IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 1978return (hwndSubMenu == IntPtr.Zero || !SafeNativeMethods.IsWindowVisible(hwndSubMenu)); 1983return (IntPtr.Zero == WindowsMenu.WindowFromSubmenu(submenu)); 2087for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowsMenu.MenuClassName, null); 2089hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, WindowsMenu.MenuClassName, null)) 2092if (hwndSubMenu == IntPtr.Zero) 2135if (hSubmenu == IntPtr.Zero) 2141if (hwndSubmenu != IntPtr.Zero) 2245if (gui.hwndCapture != IntPtr.Zero && Misc.ProxyGetClassName(gui.hwndCapture) == "ListBox") 2396(IntPtr.Zero != UnsafeNativeMethods.GetSubMenu (_hmenu, 0)) && 2534int length = UnsafeNativeMethods.GetMenuString(_hmenu, _item, IntPtr.Zero, 0, NativeMethods.MF_BYPOSITION); 2578if (_hwnd == IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsProgressbar.cs (5)
154int cur = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 155int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero); 156int max = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (11)
193return Misc.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero); 206return XSendMessage.XSendGetIndex(_hwnd, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType())); 288IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 327if (hwndBand != IntPtr.Zero) 346if (hwndBand != IntPtr.Zero && Misc.PtInWindowRect(hwndBand, x, y)) 379Misc.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero); 405if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2)) 426if (_hwndBand == IntPtr.Zero) 455private IntPtr _hwndBand = IntPtr.Zero;
MS\Internal\AutomationProxies\WindowsRichEdit.cs (10)
188int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 195result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 609ptd = IntPtr.Zero, 618pUnkForRelease = IntPtr.Zero, 619hGlobal = IntPtr.Zero 624if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 634if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 645if (globalMem == IntPtr.Zero) 682if (hwndParent != IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsScroll.cs (2)
319bool 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)
699Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 701Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (3)
297if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 389if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 565Misc.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd == _hwnd ? IntPtr.Zero : _hwnd));
MS\Internal\AutomationProxies\WindowsSlider.cs (21)
169if (IntPtr.Zero != parent) 178Misc.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero); 260int value = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 265int maxValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 290return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero); 298return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero); 306return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 314return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero); 408IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 439Misc.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero); 460XSendMessage.XSend(hwnd, NativeMethods.TBM_GETCHANNELRECT, IntPtr.Zero, new IntPtr(&rcChannel), Marshal.SizeOf(rcChannel.GetType()), XSendMessage.ErrorValue.NoCheck); 462if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcChannel, 2)) 472XSendMessage.XSend(hwnd, NativeMethods.TBM_GETTHUMBRECT, IntPtr.Zero, new IntPtr(&rcThumb), Marshal.SizeOf(rcThumb.GetType()), XSendMessage.ErrorValue.NoCheck); 474if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcThumb, 2))
MS\Internal\AutomationProxies\WindowsSpinner.cs (9)
60hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 61if (hwndBuddy == IntPtr.Zero) 265return GetUpDownFromEdit(hwnd) != IntPtr.Zero; 274if (hwndParent != IntPtr.Zero) 277while (hwndChild != IntPtr.Zero) 282IntPtr hwndBuddy = Misc.ProxySendMessage(hwndChild, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 292return IntPtr.Zero;
MS\Internal\AutomationProxies\WindowsStatusBar.cs (8)
105if (hwndChild == IntPtr.Zero || hwndChild == _hwnd) 110if(hwndChild != IntPtr.Zero && hwndChild != _hwnd) 300IntPtr hwndChild = IntPtr.Zero; 305if (hwndChild == IntPtr.Zero) 336return Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero); 349hwnd = IntPtr.Zero 596int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (22)
76if (hwndParent != IntPtr.Zero) 157if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 161index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 177int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 245if (hwndParent != IntPtr.Zero) 284Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 298return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 303return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 430if (hwndParent != IntPtr.Zero) 482Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 525int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 573if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2)) 668return Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1); 693int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 725Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 737IntPtr hwndDropDown = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "DropDown", null); 738if (hwndDropDown != IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsTab.cs (52)
259if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref hti.pt, 1)) 268if (updownHwnd != IntPtr.Zero && Misc.PtInWindowRect(updownHwnd, x, y)) 276index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType())); 290int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero); 314if (upDownHwnd != IntPtr.Zero) 333if (upDownHwnd != IntPtr.Zero) 498if (updownHwnd == IntPtr.Zero) 504int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 512Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 513Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 527if (updownHwnd == IntPtr.Zero) 533int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 536int posResult = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 585if (updownHwnd == IntPtr.Zero) 645int count = Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 684if (updownHwnd == IntPtr.Zero) 687int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 691Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 692Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 697return GetUpDownHwnd(_hwnd) != IntPtr.Zero; 723if (hwndParent != IntPtr.Zero 757if (childHwnd != IntPtr.Zero) 775return IntPtr.Zero; 801if (updownHwnd == IntPtr.Zero) 808int newPos = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 809int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 848Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 849Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 966IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1003Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1035if (hwndChild != IntPtr.Zero && SafeNativeMethods.IsWindowVisible(hwndChild)) 1149Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero); 1239return Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 1255return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item; 1277return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty; 1297if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1306Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1322if (hwndParent != IntPtr.Zero) 1330return Misc.FindWindowEx(hwndParent, IntPtr.Zero, null, sName); 1334return IntPtr.Zero;
MS\Internal\AutomationProxies\WindowsTitleBar.cs (3)
111int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y)); 431Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero); 445Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (20)
228int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero); 299if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 329return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero); 368bool hasImageList = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0; 369int exStyle = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero); 428if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 468return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 514Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 576return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item; 598int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 635IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 643|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 650if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 677if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
73if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 79if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (5)
89WinEventTracker.AddToNotificationList(IntPtr.Zero, new WinEventTracker.ProxyRaiseEvents(OnToolTipEvents), _toolTipEventIds); 106WinEventTracker.RemoveToNotificationList(IntPtr.Zero, _toolTipEventIds, new WinEventTracker.ProxyRaiseEvents(OnToolTipEvents)); 241if (hwnd == IntPtr.Zero) 299if (hwnd == IntPtr.Zero) 304int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsTreeView.cs (45)
158if (hNext != IntPtr.Zero) 185return hPrev != IntPtr.Zero ? new TreeViewItem (_hwnd, this, hPrev, (int) TVItem.TopLevel) : null; 191if (hChild != IntPtr.Zero) 196for (temp = GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = GetNextItem (_hwnd, hChild)) 210IntPtr hChild = IntPtr.Zero; 213if (hChild != IntPtr.Zero) 235if (hChild != IntPtr.Zero) 238for (IntPtr temp = GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = GetNextItem (_hwnd, hChild)) 253if (hItem != IntPtr.Zero) 265if (treeItem != IntPtr.Zero) 282if (treeItem == IntPtr.Zero) 303return (IntPtr.Zero != GetSelection (_hwnd)); 387if (hItemParent == IntPtr.Zero) 446return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_CARET); 474return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_ROOT); 553IntPtr partialDisplay = (labelOnly) ? new IntPtr (1) : IntPtr.Zero; 564return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty; 595IntPtr hwndEdit = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item); 597if (hwndEdit == IntPtr.Zero) 606if (Misc.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1) 609Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero); 617Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero); 643IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 645if (hItem != IntPtr.Zero) 654int lCommonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 657return IntPtr.Zero; 863IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 908return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero; 1006if (selectionRequired || WindowsTreeView.GetSelection(_hwnd) != IntPtr.Zero) 1228Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem); 1318return hNext != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hNext, _item + 1) : null; 1328return hPrev != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hPrev, _item + 1) : null; 1336return hChild != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hChild, _item + 1) : null; 1349if (hChild != IntPtr.Zero) 1352for (IntPtr temp = WindowsTreeView.GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = WindowsTreeView.GetNextItem (_hwnd, hChild)) 1465if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1537Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1538Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1566if (address == IntPtr.Zero) 1626return UnsafeNativeMethods.GetProp(_hwnd, "MSAAStateImageMapAddr") != IntPtr.Zero; 1633if (_hItem == IntPtr.Zero) 1636int childId = Misc.ProxySendMessageInt(_hwnd, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsUpDown.cs (16)
223Misc.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0)); 226Misc.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 291if (hwndParent != IntPtr.Zero) 340int pos = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 353IntPtr hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 356if (hwndBuddy == IntPtr.Zero) 368return hwndBuddy != IntPtr.Zero && Misc.ProxyGetClassName(hwndBuddy).Contains("EDIT", StringComparison.OrdinalIgnoreCase); 377int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 391int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 474if (hwndTabParent != IntPtr.Zero) 622if (hwndParent != IntPtr.Zero) 625hwndParent = Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32") ? hwndParent : IntPtr.Zero;
MS\Internal\AutomationProxies\WinEventTracker.cs (7)
174hp._winEventHook = Misc.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT); 197if (hwnd == IntPtr.Zero) 240if (ecp._hwnd == hwnd || ecp._hwnd == IntPtr.Zero) 292if ((ecp._hwnd == IntPtr.Zero)) 352if (hwnd == IntPtr.Zero) 409if ( (hwnd == IntPtr.Zero || ecp._hwnd == hwnd) && 448Debug.Assert (hwnd == IntPtr.Zero, @"BuildEventsList: event is global but hwnd is not null");
MS\Internal\AutomationProxies\WinFormsSpinner.cs (2)
130if (hwndFirstChild == IntPtr.Zero) 137if (hwndLastChild == IntPtr.Zero)
MS\Win32\NativeMethods.cs (25)
882pszHeader = pszFooter = IntPtr.Zero; 925pszHeader = pszFooter = IntPtr.Zero; 931pszSubtitle = IntPtr.Zero; 933pszTask = IntPtr.Zero; 935pszDescriptionTop = IntPtr.Zero; 937pszDescriptionBottom = IntPtr.Zero; 943pszSubsetTitle = IntPtr.Zero; // NULL if group is not subset 1481hwndCombo = IntPtr.Zero; 1482hwndItem = IntPtr.Zero; 1483hwndList = IntPtr.Zero; 1649pszText = IntPtr.Zero; 1654lParam = IntPtr.Zero; 1670hItem = IntPtr.Zero; 1815pszText = IntPtr.Zero; 1818lParam = IntPtr.Zero; 1826pszText = IntPtr.Zero; 1829lParam = IntPtr.Zero; 1870pszText = IntPtr.Zero; 1871hbm = IntPtr.Zero; 1874lParam = IntPtr.Zero; 1878pvFilter = IntPtr.Zero; 1936hwnd = IntPtr.Zero; 1939hinst = IntPtr.Zero; 1940pszText = IntPtr.Zero; 1941lParam = IntPtr.Zero;
MS\Win32\UnsafeNativeMethods.cs (2)
371IntPtr result = IntPtr.Zero; 389if ((result == IntPtr.Zero) && (error != 0))
UIAutomationProvider (2)
System\Windows\Automation\Provider\AutomationInteropProvider.cs (2)
58ValidateArgument(hwnd != IntPtr.Zero, nameof(SR.HwndMustBeNonNULL)); 72ValidateArgument( hwnd != IntPtr.Zero, nameof(SR.HwndMustBeNonNULL));
UIAutomationTypes (41)
MS\Internal\Automation\UiaCoreTypesApi.cs (3)
72IntPtr automationCoreHandle = LoadLibraryHelper.SecureLoadLibraryEx(DllImport.UIAutomationCore, IntPtr.Zero, UnsafeNativeMethods.LoadLibraryFlags.LOAD_LIBRARY_SEARCH_SYSTEM32); 73if (automationCoreHandle != IntPtr.Zero) 76if (entryPoint != IntPtr.Zero)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\LoadLibraryHelper.cs (3)
29var hModule = IntPtr.Zero; 34hModule != IntPtr.Zero) 39UnsafeNativeMethods.GetProcAddressNoThrow(new HandleRef(null, hModule), AddDllDirectoryName) != IntPtr.Zero;
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (10)
96public static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 1533public IntPtr hwndTrack = IntPtr.Zero; 1729public IntPtr hSubMenu = IntPtr.Zero; 1730public IntPtr hbmpChecked = IntPtr.Zero; 1731public IntPtr hbmpUnchecked = IntPtr.Zero; 1990if ((this.vt == (int)tagVT.VT_UNKNOWN || this.vt == (int)tagVT.VT_DISPATCH) && this.data1 != IntPtr.Zero) { 1994if (this.vt == (int)tagVT.VT_BSTR && this.data1 != IntPtr.Zero) { 1998this.data1 = this.data2 = IntPtr.Zero; 2142return (val != IntPtr.Zero); 2833public static readonly IntPtr WTS_CURRENT_SERVER_HANDLE = IntPtr.Zero;
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsOther.cs (14)
346public IntPtr lpfnWndProc = IntPtr.Zero; 352public IntPtr hInstance = IntPtr.Zero; 354public IntPtr hIcon = IntPtr.Zero; 356public IntPtr hCursor = IntPtr.Zero; 358public IntPtr hbrBackground = IntPtr.Zero; 360public IntPtr lpszMenuName = IntPtr.Zero; 362public IntPtr lpszClassName = IntPtr.Zero; 364public IntPtr hIconSm = IntPtr.Zero; 561 return (LocalFree(base.handle) == IntPtr.Zero); 619public IntPtr hInstance = IntPtr.Zero; 621public IntPtr hIcon = IntPtr.Zero; 623public IntPtr hCursor = IntPtr.Zero; 625public IntPtr hbrBackground = IntPtr.Zero; 631public IntPtr hIconSm = IntPtr.Zero;
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (11)
229return IntOleInitialize(IntPtr.Zero); 447IntPtr result = IntPtr.Zero; 459IntPtr result = IntPtr.Zero; 468if (result == IntPtr.Zero && errorCode != 0) 481if (retVal == IntPtr.Zero && errorCode != 0) 504if (retVal == IntPtr.Zero) 523if (result == IntPtr.Zero) 840if (hDc == IntPtr.Zero) 1053if (retVal == IntPtr.Zero) 2557IntPtr mem = IntPtr.Zero; 2574if (mem != IntPtr.Zero)
vbc (7)
src\roslyn\src\Compilers\Shared\BuildClient.cs (1)
356if (ptr == IntPtr.Zero)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
474return IntPtr.Zero; 583IntPtr environmentBlockPtr = IntPtr.Zero; 620if (environmentBlockPtr != IntPtr.Zero)
src\roslyn\src\Compilers\Shared\NativeMethods.cs (3)
58internal static readonly IntPtr NullPtr = IntPtr.Zero; 124lpSecurityAttributes: IntPtr.Zero, 127hTemplateFile: IntPtr.Zero);
VBCSCompiler (7)
src\roslyn\src\Compilers\Shared\BuildClient.cs (1)
356if (ptr == IntPtr.Zero)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
474return IntPtr.Zero; 583IntPtr environmentBlockPtr = IntPtr.Zero; 620if (environmentBlockPtr != IntPtr.Zero)
src\roslyn\src\Compilers\Shared\NativeMethods.cs (3)
58internal static readonly IntPtr NullPtr = IntPtr.Zero; 124lpSecurityAttributes: IntPtr.Zero, 127hTemplateFile: IntPtr.Zero);
WindowsFormsIntegration (11)
MS\Win32\NativeMethods.cs (1)
15public static IntPtr HWND_TOP = IntPtr.Zero;
MS\Win32\UnsafeNativeMethods.cs (1)
48return IntCreateDC(lpszDriver, null, null, IntPtr.Zero);
System\Windows\Automation\Peers\WindowsFormsHostAutomationPeer.cs (1)
39if(hwnd != IntPtr.Zero)
System\Windows\Integration\ElementHost.cs (3)
258if (this.HwndSource != null && this.HwndSource.Handle != IntPtr.Zero) 622return IntPtr.Zero; // This value depends on the message being processed, see MSDN for the particular message. 788if (!DesignMode && m.WParam == IntPtr.Zero)
System\Windows\Integration\WindowsFormsHost.cs (5)
141IntPtr result = IntPtr.Zero; 719private IntPtr _prevFocusHwnd = IntPtr.Zero; 742if (IntPtr.Zero == _prevFocusHwnd ) { return; } 965IntPtr.Zero) != IntPtr.Zero)