74 types derived from SafeHandle
Infrastructure.Common (1)
SafeKeychainHandle.cs (1)
13public class SafeKeychainHandle : SafeHandle
Microsoft.AspNetCore.Server.HttpSys (1)
NativeInterop\SafeNativeOverlapped.cs (1)
9internal sealed class SafeNativeOverlapped : SafeHandle
Microsoft.AspNetCore.Server.IIS (1)
Core\NativeSafeHandle.cs (1)
9internal sealed class NativeSafeHandle : SafeHandle, IValueTaskSource<object?>
Microsoft.Build (1)
InprocTrackingNativeMethods.cs (1)
280private class SafeLibraryHandle : SafeHandle
Microsoft.Build.Utilities.Core (1)
InprocTrackingNativeMethods.cs (1)
280private class SafeLibraryHandle : SafeHandle
Microsoft.CodeAnalysis.Workspaces (3)
Storage\SQLite\Interop\SafeSqliteBlobHandle.cs (1)
12internal sealed class SafeSqliteBlobHandle : SafeHandle
Storage\SQLite\Interop\SafeSqliteHandle.cs (1)
12internal sealed class SafeSqliteHandle : SafeHandle
Storage\SQLite\Interop\SafeSqliteStatementHandle.cs (1)
12internal sealed class SafeSqliteStatementHandle : SafeHandle
PresentationCore (2)
MS\Win32\UnsafeNativeMethodsTablet.cs (2)
64internal class RecognizerSafeHandle : SafeHandle 98internal class ContextSafeHandle : SafeHandle
ReachFramework (2)
MS\Internal\Printing\Configuration\SafeWinSpoolPrinterHandle.cs (1)
13internal sealed class SafeWinSpoolPrinterHandle : SafeHandle
PrintConfig\PTProvider.cs (1)
40internal sealed class SafePTProviderHandle : System.Runtime.InteropServices.SafeHandle
System.Data.Odbc (2)
Common\System\Data\ProviderBase\DbBuffer.cs (1)
13internal abstract class DbBuffer : SafeHandle
System\Data\Odbc\OdbcHandle.cs (1)
12internal abstract class OdbcHandle : SafeHandle
System.IO.Compression (1)
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (1)
154public sealed class ZLibStreamHandle : SafeHandle
System.IO.Compression.Brotli (2)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBrotliHandle.cs (2)
9internal sealed class SafeBrotliEncoderHandle : SafeHandle 22internal sealed class SafeBrotliDecoderHandle : SafeHandle
System.Net.Quic (11)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Stack.cs (1)
64internal sealed class SafeX509StackHandle : SafeHandle
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509StoreCtx.cs (1)
72internal sealed class SafeX509StoreCtxHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (2)
9internal sealed class SafeAsn1ObjectHandle : SafeHandle 29internal sealed class SafeAsn1OctetStringHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (1)
11internal sealed class SafeBioHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (1)
10internal abstract class SafeInteriorHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (3)
10internal sealed class SafeX509Handle : SafeHandle 48internal sealed class SafeX509CrlHandle : SafeHandle 68internal sealed class SafeX509StoreHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (1)
10internal sealed class SafeX509ExtensionHandle : SafeHandle
System\Net\Quic\Internal\MsQuicSafeHandle.cs (1)
11internal unsafe class MsQuicSafeHandle : SafeHandle
System.Net.Security (14)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtx.cs (1)
70internal sealed class SafeSslContextHandle : SafeHandle, ISafeHandleCachable
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Stack.cs (1)
64internal sealed class SafeX509StackHandle : SafeHandle
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509StoreCtx.cs (1)
72internal sealed class SafeX509StoreCtxHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (2)
9internal sealed class SafeAsn1ObjectHandle : SafeHandle 29internal sealed class SafeAsn1OctetStringHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\GssSafeHandles.cs (3)
14internal sealed class SafeGssNameHandle : SafeHandle 71internal sealed class SafeGssCredHandle : SafeHandle 156internal sealed class SafeGssContextHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (1)
11internal sealed class SafeBioHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (1)
10internal abstract class SafeInteriorHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (3)
10internal sealed class SafeX509Handle : SafeHandle 48internal sealed class SafeX509CrlHandle : SafeHandle 68internal sealed class SafeX509StoreHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (1)
10internal sealed class SafeX509ExtensionHandle : SafeHandle
System.Net.WebSockets (1)
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (1)
154public sealed class ZLibStreamHandle : SafeHandle
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeHandleMinusOneIsInvalid.cs (1)
10public abstract class SafeHandleMinusOneIsInvalid : SafeHandle
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeHandleZeroOrMinusOneIsInvalid.cs (1)
10public abstract class SafeHandleZeroOrMinusOneIsInvalid : SafeHandle
System.Security.Cryptography (22)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Stack.cs (1)
64internal sealed class SafeX509StackHandle : SafeHandle
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509StoreCtx.cs (1)
72internal sealed class SafeX509StoreCtxHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (2)
9internal sealed class SafeAsn1ObjectHandle : SafeHandle 29internal sealed class SafeAsn1OctetStringHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBignumHandle.Unix.cs (1)
10internal sealed class SafeBignumHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (1)
11internal sealed class SafeBioHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeDsaHandle.Unix.cs (1)
11internal sealed class SafeDsaHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEcKeyHandle.Unix.cs (1)
11internal sealed class SafeEcKeyHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEvpCipherCtxHandle.Unix.cs (1)
10internal sealed class SafeEvpCipherCtxHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEvpKdfHandle.Unix.cs (1)
10internal sealed class SafeEvpKdfHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEvpMacCtxHandle.Unix.cs (1)
10internal sealed class SafeEvpMacCtxHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEvpMacHandle.Unix.cs (1)
10internal sealed class SafeEvpMacHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEvpMdCtxHandle.Unix.cs (1)
10internal sealed class SafeEvpMdCtxHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeHmacCtxHandle.Unix.cs (1)
9internal sealed class SafeHmacCtxHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (1)
10internal abstract class SafeInteriorHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafePkcs7Handle.Unix.cs (1)
9internal sealed class SafePkcs7Handle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (3)
10internal sealed class SafeX509Handle : SafeHandle 48internal sealed class SafeX509CrlHandle : SafeHandle 68internal sealed class SafeX509StoreHandle : SafeHandle
src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (1)
10internal sealed class SafeX509ExtensionHandle : SafeHandle
System\Security\Cryptography\FixedMemoryKeyBox.cs (1)
8internal sealed unsafe class FixedMemoryKeyBox : SafeHandle
System\Security\Cryptography\SafeEvpPKeyHandle.OpenSsl.cs (1)
10public sealed partial class SafeEvpPKeyHandle : SafeHandle
System.Security.Principal.Windows (1)
artifacts\obj\System.Security.Principal.Windows\Debug\net10.0\System.Security.Principal.Windows.notsupported.cs (1)
9public sealed partial class SafeAccessTokenHandle : System.Runtime.InteropServices.SafeHandle
System.Windows.Forms.Primitives (1)
Microsoft\Win32\SafeHandles\CoTaskMemSafeHandle.cs (1)
8internal sealed class CoTaskMemSafeHandle : SafeHandle
UIAutomationClient (5)
MS\Internal\Automation\SafeHandles.cs (3)
15internal sealed class SafeNodeHandle : SafeHandle 39internal sealed class SafePatternHandle : SafeHandle 62internal sealed class SafeEventHandle : SafeHandle
System\Windows\Automation\Condition.cs (1)
10internal sealed class SafeConditionMemoryHandle : SafeHandle
System\Windows\Automation\Text\TextRange.cs (1)
17internal sealed class SafeTextRangeHandle : SafeHandle
271 references to SafeHandle
Microsoft.AspNetCore.Cryptography.Internal (3)
CryptoUtil.cs (1)
30public static void AssertSafeHandleIsValid(SafeHandle safeHandle)
UnsafeNativeMethods.cs (2)
297SafeHandle pData, 340SafeHandle pData,
Microsoft.AspNetCore.DataProtection (2)
MemoryProtection.cs (2)
17public static void CryptProtectMemory(SafeHandle pBuffer, uint byteCount) 33public static void CryptUnprotectMemory(SafeHandle pBuffer, uint byteCount)
Microsoft.AspNetCore.Server.HttpSys (15)
NativeInterop\HttpApi.cs (11)
17internal static partial uint HttpReceiveRequestEntityBody(SafeHandle requestQueueHandle, ulong requestId, uint flags, IntPtr pEntityBuffer, uint entityBufferLength, out uint bytesReturned, SafeNativeOverlapped pOverlapped); 20internal static unsafe partial uint HttpReceiveClientCertificate(SafeHandle requestQueueHandle, ulong connectionId, uint flags, Windows.Win32.Networking.HttpServer.HTTP_SSL_CLIENT_CERT_INFO* pSslClientCertInfo, uint sslClientCertInfoSize, uint* pBytesReceived, SafeNativeOverlapped pOverlapped); 23internal static unsafe partial uint HttpReceiveHttpRequest(SafeHandle requestQueueHandle, ulong requestId, uint flags, Windows.Win32.Networking.HttpServer.HTTP_REQUEST_V1* pRequestBuffer, uint requestBufferLength, uint* pBytesReturned, NativeOverlapped* pOverlapped); 26internal static unsafe partial uint HttpSendHttpResponse(SafeHandle requestQueueHandle, ulong requestId, uint flags, Windows.Win32.Networking.HttpServer.HTTP_RESPONSE_V2* pHttpResponse, Windows.Win32.Networking.HttpServer.HTTP_CACHE_POLICY* pCachePolicy, uint* pBytesSent, IntPtr pReserved1, uint Reserved2, SafeNativeOverlapped pOverlapped, IntPtr pLogData); 29internal static unsafe partial uint HttpWaitForDisconnectEx(SafeHandle requestQueueHandle, ulong connectionId, uint reserved, NativeOverlapped* overlapped); 32internal static unsafe partial uint HttpSendResponseEntityBody(SafeHandle requestQueueHandle, ulong requestId, uint flags, ushort entityChunkCount, Windows.Win32.Networking.HttpServer.HTTP_DATA_CHUNK* pEntityChunks, uint* pBytesSent, IntPtr pReserved1, uint Reserved2, SafeNativeOverlapped pOverlapped, IntPtr pLogData); 35internal static partial uint CancelIoEx(SafeHandle handle, SafeNativeOverlapped overlapped); 37internal unsafe delegate uint HttpGetRequestPropertyInvoker(SafeHandle requestQueueHandle, ulong requestId, HTTP_REQUEST_PROPERTY propertyId, 40internal unsafe delegate uint HttpSetRequestPropertyInvoker(SafeHandle requestQueueHandle, ulong requestId, HTTP_REQUEST_PROPERTY propertyId, 55internal static unsafe uint HttpGetRequestProperty(SafeHandle requestQueueHandle, ulong requestId, HTTP_REQUEST_PROPERTY propertyId, 61internal static unsafe uint HttpSetRequestProperty(SafeHandle requestQueueHandle, ulong requestId, HTTP_REQUEST_PROPERTY propertyId,
NativeInterop\RequestQueue.cs (1)
139internal SafeHandle Handle { get; }
RequestProcessing\ClientCertLoader.cs (1)
47internal SafeHandle RequestQueueHandle => _requestContext.Server.RequestQueue.Handle;
RequestProcessing\RequestStream.cs (1)
36private SafeHandle RequestQueueHandle => RequestContext.Server.RequestQueue.Handle;
RequestProcessing\ResponseBody.cs (1)
34private SafeHandle RequestQueueHandle => RequestContext.Server.RequestQueue.Handle;
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
DelegateTests.cs (1)
312unsafe void AssertPermissions(SafeHandle handle)
Microsoft.Build (3)
InprocTrackingNativeMethods.cs (2)
157private static SafeHandle s_fileTrackerDllHandle; 188private static extern IntPtr GetProcAddress(SafeHandle moduleHandle, String procName);
WindowsNative.cs (1)
268public static extern bool FindNextFileW(SafeHandle hFindFile, out Win32FindData lpFindFileData);
Microsoft.Build.Engine.OM.UnitTests (1)
WindowsNative.cs (1)
268public static extern bool FindNextFileW(SafeHandle hFindFile, out Win32FindData lpFindFileData);
Microsoft.Build.Tasks.Core (1)
WindowsNative.cs (1)
268public static extern bool FindNextFileW(SafeHandle hFindFile, out Win32FindData lpFindFileData);
Microsoft.Build.Utilities.Core (3)
InprocTrackingNativeMethods.cs (2)
157private static SafeHandle s_fileTrackerDllHandle; 188private static extern IntPtr GetProcAddress(SafeHandle moduleHandle, String procName);
WindowsNative.cs (1)
268public static extern bool FindNextFileW(SafeHandle hFindFile, out Win32FindData lpFindFileData);
Microsoft.CodeAnalysis.Workspaces (9)
Shared\Extensions\SafeHandleExtensions.cs (5)
15/// Acquires a lease on a safe handle. The lease increments the reference count of the <see cref="SafeHandle"/> 20/// lease will permanently prevent the underlying <see cref="SafeHandle"/> from being released by the garbage 23/// <param name="handle">The <see cref="SafeHandle"/> to lease.</param> 26public static SafeHandleLease Lease(this SafeHandle handle) 34Debug.Assert(success, $"{nameof(SafeHandle.DangerousAddRef)} does not return when {nameof(success)} is false.");
Shared\Extensions\SafeHandleLease.cs (4)
11/// Represents a lease of a <see cref="SafeHandle"/>. 17private readonly SafeHandle? _handle; 19internal SafeHandleLease(SafeHandle handle) 23/// Releases the <see cref="SafeHandle"/> lease. The behavior of this method is unspecified if called more than
Microsoft.DotNet.RemoteExecutor (2)
MiniDump.cs (2)
40SafeHandle hProcess, 42SafeHandle hFile,
MSBuild (1)
WindowsNative.cs (1)
268public static extern bool FindNextFileW(SafeHandle hFindFile, out Win32FindData lpFindFileData);
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
721[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.SafeHandle))]
netstandard (1)
netstandard.cs (1)
1728[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.SafeHandle))]
PresentationCore (23)
System\Windows\Input\Cursor.cs (3)
91internal Cursor(SafeHandle cursorHandle ) 142internal SafeHandle Handle 343private SafeHandle _cursorHandle;
System\Windows\InterOp\CursorInteropHelper.cs (2)
40public static Cursor Create(SafeHandle cursorHandle) 61internal static Cursor CriticalCreate(SafeHandle cursorHandle)
System\Windows\Media\Effects\BevelBitmapEffect.cs (2)
27protected override unsafe SafeHandle CreateUnmanagedEffect() 36protected override void UpdateUnmanagedPropertyState(SafeHandle unmanagedEffect)
System\Windows\Media\Effects\BitmapEffect.cs (6)
41protected abstract void UpdateUnmanagedPropertyState(SafeHandle unmanagedEffect); 48protected abstract unsafe SafeHandle CreateUnmanagedEffect(); 58protected static unsafe void SetValue(SafeHandle effect, string propertyName, object value) 67protected static unsafe SafeHandle /* IMILBitmapEffect */ CreateBitmapEffectOuter() 78protected static unsafe void InitializeBitmapEffect(SafeHandle /*IMILBitmapEffect */ outerObject, 79SafeHandle/* IMILBitmapEffectPrimitive */ innerObject)
System\Windows\Media\Effects\BitmapEffectGroup.cs (2)
33protected override void UpdateUnmanagedPropertyState(SafeHandle unmanagedEffect) 42protected override unsafe SafeHandle CreateUnmanagedEffect()
System\Windows\Media\Effects\BlurBitmapEffect.cs (2)
27protected override unsafe SafeHandle CreateUnmanagedEffect() 36protected override void UpdateUnmanagedPropertyState(SafeHandle unmanagedEffect)
System\Windows\Media\Effects\DropShadowBitmapEffect.cs (2)
30protected override unsafe SafeHandle CreateUnmanagedEffect() 39protected override void UpdateUnmanagedPropertyState(SafeHandle unmanagedEffect)
System\Windows\Media\Effects\embossbitmapeffect.cs (2)
30protected override unsafe SafeHandle CreateUnmanagedEffect() 39protected override void UpdateUnmanagedPropertyState(SafeHandle unmanagedEffect)
System\Windows\Media\Effects\OuterGlowBitmapEffect.cs (2)
27protected override unsafe SafeHandle CreateUnmanagedEffect() 36protected override void UpdateUnmanagedPropertyState(SafeHandle unmanagedEffect)
ReachFramework (1)
MS\Internal\Printing\Configuration\HGlobalBuffer.cs (1)
48SafeHandle handle = this.Handle;
System.Console (5)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Poll.cs (1)
31internal static unsafe Error Poll(SafeHandle fd, PollEvents events, int timeout, out PollEvents triggered)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Read.cs (1)
21internal static unsafe partial int Read(SafeHandle fd, byte* buffer, int count);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
59internal static partial int FStat(SafeHandle fd, out FileStatus output);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Write.cs (1)
21internal static unsafe partial int Write(SafeHandle fd, byte* buffer, int bufferSize);
System.Diagnostics.FileVersionInfo (1)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
59internal static partial int FStat(SafeHandle fd, out FileStatus output);
System.Diagnostics.Process (1)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
59internal static partial int FStat(SafeHandle fd, out FileStatus output);
System.Formats.Tar (2)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
59internal static partial int FStat(SafeHandle fd, out FileStatus output);
System.IO.Compression (3)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
59internal static partial int FStat(SafeHandle fd, out FileStatus output);
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (2)
145/// <see cref="SafeHandle" />. This would save an <see cref="IntPtr" /> field since 146/// <see cref="ZLibStreamHandle" /> does not actually use its <see cref="SafeHandle.handle" /> field.
System.IO.Compression.ZipFile (2)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
59internal static partial int FStat(SafeHandle fd, out FileStatus output);
System.IO.FileSystem.DriveInfo (1)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
System.IO.FileSystem.Watcher (4)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Poll.cs (1)
31internal static unsafe Error Poll(SafeHandle fd, PollEvents events, int timeout, out PollEvents triggered)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Read.cs (1)
21internal static unsafe partial int Read(SafeHandle fd, byte* buffer, int count);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
59internal static partial int FStat(SafeHandle fd, out FileStatus output);
System.IO.MemoryMappedFiles (6)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Fcntl.cs (4)
17internal static partial int SetIsNonBlocking(SafeHandle fd, int isNonBlocking); 20internal static partial int GetIsNonBlocking(SafeHandle fd, [MarshalAs(UnmanagedType.Bool)] out bool isNonBlocking); 23internal static partial int SetFD(SafeHandle fd, int flags); 26internal static partial int GetFD(SafeHandle fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
59internal static partial int FStat(SafeHandle fd, out FileStatus output);
System.IO.Pipes (11)
Microsoft\Win32\SafeHandles\SafePipeHandle.Unix.cs (2)
26private SafeHandle? _pipeSocketHandle; 37internal SafeHandle? PipeSocketHandle => _pipeSocketHandle;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Fcntl.cs (4)
17internal static partial int SetIsNonBlocking(SafeHandle fd, int isNonBlocking); 20internal static partial int GetIsNonBlocking(SafeHandle fd, [MarshalAs(UnmanagedType.Bool)] out bool isNonBlocking); 23internal static partial int SetFD(SafeHandle fd, int flags); 26internal static partial int GetFD(SafeHandle fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPeerID.cs (1)
12internal static partial int GetPeerID(SafeHandle socket, out uint euid);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
59internal static partial int FStat(SafeHandle fd, out FileStatus output);
System\IO\Pipes\NamedPipeServerStream.Unix.cs (2)
161SafeHandle? handle = InternalHandle?.PipeSocketHandle; 200SafeHandle? handle = InternalHandle?.PipeSocketHandle;
System.IO.Pipes.AccessControl (1)
artifacts\obj\System.IO.Pipes.AccessControl\Debug\net10.0\System.IO.Pipes.AccessControl.notsupported.cs (1)
39protected internal void Persist(System.Runtime.InteropServices.SafeHandle handle) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); }
System.IO.Ports (4)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
src\libraries\Common\src\Interop\Unix\System.IO.Ports.Native\Interop.Serial.cs (3)
33internal static unsafe partial int Read(SafeHandle fd, byte* buffer, int count); 45internal static unsafe partial int Write(SafeHandle fd, byte* buffer, int bufferSize); 66internal static unsafe Error Poll(SafeHandle fd, PollEvents events, int timeout, out PollEvents triggered)
System.Net.Http (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
147if (value is SafeHandle handle)
System.Net.HttpListener (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
147if (value is SafeHandle handle)
System.Net.Mail (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
147if (value is SafeHandle handle)
System.Net.NameResolution (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
147if (value is SafeHandle handle)
System.Net.NetworkInformation (1)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.NetworkChange.cs (1)
23public static unsafe partial Error ReadEvents(SafeHandle socket, delegate* unmanaged<IntPtr, NetworkChangeKind, void> onNetworkChange);
System.Net.Ping (1)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.ReceiveSocketError.cs (1)
13internal static unsafe partial SocketError ReceiveSocketError(SafeHandle socket, MessageHeader* messageHeader);
System.Net.Primitives (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
147if (value is SafeHandle handle)
System.Net.Quic (16)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
90internal static void CheckValidOpenSslHandle(SafeHandle handle)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (3)
13private SafeHandle? _parent; 27SafeHandle parent = _parent; 48internal void TransferOwnershipToParent(SafeHandle parent)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeHandleCache.cs (4)
13internal static class SafeHandleCache<T> where T : SafeHandle 19/// or it should override <see cref="SafeHandle.Dispose(bool)"/> to prevent disposal when the 20/// instance represents an invalid handle: <see cref="System.Runtime.InteropServices.SafeHandle.IsInvalid"/> returns <see language="true"/>. 49internal static bool IsCachedInvalidHandle(SafeHandle handle)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (5)
12private SafeHandle? _parent; 21SafeHandle? parent = _parent; 42internal void SetParent(SafeHandle parent) 55where TExteriorHandle : SafeHandle 72where TExteriorHandle : SafeHandle
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
147if (value is SafeHandle handle)
src\libraries\Common\src\System\Net\SafeHandleCache.cs (2)
28/// cref="SafeHandle"/>. The purpose of the cache is to allow reuse of 34internal class SafeHandleCache<TKey, THandle> where TKey : IEquatable<TKey> where THandle : SafeHandle, ISafeHandleCachable
System.Net.Requests (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
147if (value is SafeHandle handle)
System.Net.Security (16)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
90internal static void CheckValidOpenSslHandle(SafeHandle handle)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (3)
13private SafeHandle? _parent; 27SafeHandle parent = _parent; 48internal void TransferOwnershipToParent(SafeHandle parent)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeHandleCache.cs (4)
13internal static class SafeHandleCache<T> where T : SafeHandle 19/// or it should override <see cref="SafeHandle.Dispose(bool)"/> to prevent disposal when the 20/// instance represents an invalid handle: <see cref="System.Runtime.InteropServices.SafeHandle.IsInvalid"/> returns <see language="true"/>. 49internal static bool IsCachedInvalidHandle(SafeHandle handle)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (5)
12private SafeHandle? _parent; 21SafeHandle? parent = _parent; 42internal void SetParent(SafeHandle parent) 55where TExteriorHandle : SafeHandle 72where TExteriorHandle : SafeHandle
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
147if (value is SafeHandle handle)
src\libraries\Common\src\System\Net\SafeHandleCache.cs (2)
28/// cref="SafeHandle"/>. The purpose of the cache is to allow reuse of 34internal class SafeHandleCache<TKey, THandle> where TKey : IEquatable<TKey> where THandle : SafeHandle, ISafeHandleCachable
System.Net.Sockets (40)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Accept.cs (1)
12internal static unsafe partial Error Accept(SafeHandle socket, byte* socketAddress, int* socketAddressLen, IntPtr* acceptedFd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Bind.cs (2)
13private static partial Error Bind(SafeHandle socket, ProtocolType socketProtocolType, ReadOnlySpan<byte> socketAddress, int socketAddressLen); 16SafeHandle socket, ProtocolType socketProtocolType, ReadOnlySpan<byte> socketAddress)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Connect.cs (2)
12internal static unsafe partial Error Connect(SafeHandle socket, byte* socketAddress, int socketAddressLen); 15internal static unsafe partial Error Connectx(SafeHandle socket, byte* socketAddress, int socketAddressLen, Span<byte> buffer, int bufferLen, int enableTfo, int* sent);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Fcntl.cs (4)
17internal static partial int SetIsNonBlocking(SafeHandle fd, int isNonBlocking); 20internal static partial int GetIsNonBlocking(SafeHandle fd, [MarshalAs(UnmanagedType.Bool)] out bool isNonBlocking); 23internal static partial int SetFD(SafeHandle fd, int flags); 26internal static partial int GetFD(SafeHandle fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetBytesAvailable.cs (2)
12internal static unsafe partial Error GetBytesAvailable(SafeHandle socket, int* available); 15internal static unsafe partial Error GetAtOutOfBandMark(SafeHandle socket, int* atMark);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPeerName.cs (1)
12internal static unsafe partial Error GetPeerName(SafeHandle socket, byte* socketAddress, int* socketAddressLen);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetSocketErrorOption.cs (1)
13internal static unsafe partial Error GetSocketErrorOption(SafeHandle socket, Error* socketError);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetSockName.cs (1)
12internal static unsafe partial Error GetSockName(SafeHandle socket, byte* socketAddress, int* socketAddressLen);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetSockOpt.cs (2)
13internal static unsafe partial Error GetSockOpt(SafeHandle socket, SocketOptionLevel optionLevel, SocketOptionName optionName, byte* optionValue, int* optionLen); 19internal static unsafe partial Error GetRawSockOpt(SafeHandle socket, int optionLevel, int optionName, byte* optionValue, int* optionLen);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.LingerOption.cs (2)
19internal static unsafe partial Error GetLingerOption(SafeHandle socket, LingerOption* option); 22internal static unsafe partial Error SetLingerOption(SafeHandle socket, LingerOption* option);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Listen.cs (1)
12internal static partial Error Listen(SafeHandle socket, int backlog);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MulticastOption.cs (4)
35internal static unsafe partial Error GetIPv4MulticastOption(SafeHandle socket, MulticastOption multicastOption, IPv4MulticastOption* option); 38internal static unsafe partial Error SetIPv4MulticastOption(SafeHandle socket, MulticastOption multicastOption, IPv4MulticastOption* option); 41internal static unsafe partial Error GetIPv6MulticastOption(SafeHandle socket, MulticastOption multicastOption, IPv6MulticastOption* option); 44internal static unsafe partial Error SetIPv6MulticastOption(SafeHandle socket, MulticastOption multicastOption, IPv6MulticastOption* option);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Poll.cs (1)
31internal static unsafe Error Poll(SafeHandle fd, PollEvents events, int timeout, out PollEvents triggered)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Read.cs (1)
21internal static unsafe partial int Read(SafeHandle fd, byte* buffer, int count);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Receive.cs (1)
13internal static unsafe partial Error Receive(SafeHandle socket, byte* buffer, int bufferLen, SocketFlags flags, int* received);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.ReceiveMessage.cs (1)
13internal static unsafe partial Error ReceiveMessage(SafeHandle socket, MessageHeader* messageHeader, SocketFlags flags, long* received);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Send.cs (1)
13internal static unsafe partial Error Send(SafeHandle socket, byte* buffer, int bufferLen, SocketFlags flags, int* sent);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.SendFile.cs (2)
11internal static partial Error SendFile(SafeHandle out_fd, SafeHandle in_fd, long offset, long count, out long sent);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.SendMessage.cs (1)
13internal static unsafe partial Error SendMessage(SafeHandle socket, MessageHeader* messageHeader, SocketFlags flags, long* sent);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.SetReceiveTimeout.cs (1)
13internal static partial Error SetReceiveTimeout(SafeHandle socket, int millisecondsTimeout);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.SetSendTimeout.cs (1)
13internal static partial Error SetSendTimeout(SafeHandle socket, int millisecondsTimeout);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.SetSockOpt.cs (2)
13internal static unsafe partial Error SetSockOpt(SafeHandle socket, SocketOptionLevel optionLevel, SocketOptionName optionName, byte* optionValue, int optionLen); 19internal static unsafe partial Error SetRawSockOpt(SafeHandle socket, int optionLevel, int optionName, byte* optionValue, int optionLen);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Shutdown.cs (1)
13internal static partial Error Shutdown(SafeHandle socket, SocketShutdown how);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.SocketEvent.cs (1)
43internal static partial Error TryChangeSocketEventRegistration(IntPtr port, SafeHandle socket, SocketEvents currentEvents, SocketEvents newEvents, IntPtr data);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
59internal static partial int FStat(SafeHandle fd, out FileStatus output);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Write.cs (1)
21internal static unsafe partial int Write(SafeHandle fd, byte* buffer, int bufferSize);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
147if (value is SafeHandle handle)
System.Net.WebSockets (3)
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (2)
145/// <see cref="SafeHandle" />. This would save an <see cref="IntPtr" /> field since 146/// <see cref="ZLibStreamHandle" /> does not actually use its <see cref="SafeHandle.handle" /> field.
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
147if (value is SafeHandle handle)
System.Private.CoreLib (37)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
src\libraries\Common\src\Interop\Unix\System.Native\Interop.LChflags.cs (1)
21internal static partial int FChflags(SafeHandle fd, uint flags);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.LockFileRegion.cs (1)
18internal static partial int LockFileRegion(SafeHandle fd, long offset, long length, LockType lockType);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.PRead.cs (1)
11internal static unsafe partial int PRead(SafeHandle fd, byte* buffer, int bufferSize, long fileOffset);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.PReadV.cs (1)
11internal static unsafe partial long PReadV(SafeHandle fd, IOVector* vectors, int vectorCount, long fileOffset);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.PWrite.cs (1)
11internal static unsafe partial int PWrite(SafeHandle fd, byte* buffer, int bufferSize, long fileOffset);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.PWriteV.cs (1)
11internal static unsafe partial long PWriteV(SafeHandle fd, IOVector* vectors, int vectorCount, long fileOffset);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Read.cs (1)
21internal static unsafe partial int Read(SafeHandle fd, byte* buffer, int count);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
59internal static partial int FStat(SafeHandle fd, out FileStatus output);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.UTimensat.cs (1)
29internal static unsafe partial int FUTimens(SafeHandle fd, TimeSpec* times);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Write.cs (1)
21internal static unsafe partial int Write(SafeHandle fd, byte* buffer, int bufferSize);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (3)
1250/// Initializes the underlying handle of a newly created <see cref="SafeHandle" /> to the provided value. 1252/// <param name="safeHandle">The <see cref="SafeHandle"/> instance to update.</param> 1254public static void InitHandle(SafeHandle safeHandle, IntPtr handle)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\SafeHandleMarshaller.cs (7)
9/// A marshaller for <see cref="SafeHandle"/>-derived types that marshals the handle following the lifetime rules for <see cref="SafeHandle"/>s. 11/// <typeparam name="T">The <see cref="SafeHandle"/>-derived type.</typeparam> 15public static class SafeHandleMarshaller<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] T> where T : SafeHandle 18/// Custom marshaller to marshal a <see cref="SafeHandle"/> as its underlying handle value. 54/// Custom marshaller to marshal a <see cref="SafeHandle"/> as its underlying handle value. 148/// Custom marshaller to marshal a <see cref="SafeHandle"/> as its underlying handle value.
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPool.Unix.cs (1)
103public static bool BindHandle(SafeHandle osHandle) =>
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandle.Unix.cs (7)
19private readonly SafeHandle _handle; 22private ThreadPoolBoundHandle(SafeHandle handle) 31/// A <see cref="SafeHandle"/> object that holds the bound operating system handle. 33public SafeHandle Handle => _handle; 40/// A <see cref="SafeHandle"/> object that holds the operating system handle. The 72/// it remains the responsibility of the caller to call <see cref="SafeHandle.Dispose()"/>. 74public static ThreadPoolBoundHandle BindHandle(SafeHandle handle)
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandleExtensions.cs (2)
14/// <returns>A <see cref="Runtime.InteropServices.SafeHandle"/> representing the native operating system handle.</returns> 26/// <param name="value">A <see cref="Runtime.InteropServices.SafeHandle"/> representing the native operating system handle.</param>
src\System\StubHelpers.cs (6)
508internal static IntPtr ConvertSafeHandleToNative(SafeHandle? handle, ref CleanupWorkListElement? cleanupWorkList) 1292public SafeHandleCleanupWorkListElement(SafeHandle handle) 1297private readonly SafeHandle m_handle; 1330internal static IntPtr AddToCleanupList(ref CleanupWorkListElement? pCleanupWorkList, SafeHandle handle) 1424internal static IntPtr SafeHandleAddRef(SafeHandle pHandle, ref bool success) 1436internal static void SafeHandleRelease(SafeHandle pHandle)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
687[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.SafeHandle))]
System.Runtime.Handles (1)
System.Runtime.Handles.cs (1)
7[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.SafeHandle))]
System.Runtime.InteropServices (1)
artifacts\obj\System.Runtime.InteropServices\Debug\net10.0\System.Runtime.InteropServices.Forwards.cs (1)
131[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.SafeHandle))]
System.Security.AccessControl (9)
artifacts\obj\System.Security.AccessControl\Debug\net10.0\System.Security.AccessControl.notsupported.cs (9)
325protected NativeObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle? handle, System.Security.AccessControl.AccessControlSections includeSections) : base (default(bool)) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 326protected NativeObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle? handle, System.Security.AccessControl.AccessControlSections includeSections, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode? exceptionFromErrorCode, object? exceptionContext) : base (default(bool)) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 330protected sealed override void Persist(System.Runtime.InteropServices.SafeHandle handle, System.Security.AccessControl.AccessControlSections includeSections) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 331protected void Persist(System.Runtime.InteropServices.SafeHandle handle, System.Security.AccessControl.AccessControlSections includeSections, object? exceptionContext) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 334protected internal delegate System.Exception? ExceptionFromErrorCode(int errorCode, string? name, System.Runtime.InteropServices.SafeHandle? handle, object? context); 398protected virtual void Persist(System.Runtime.InteropServices.SafeHandle handle, System.Security.AccessControl.AccessControlSections includeSections) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 418protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle? safeHandle, System.Security.AccessControl.AccessControlSections includeSections) : base (default(bool), default(System.Security.AccessControl.ResourceType)) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 419protected ObjectSecurity(bool isContainer, System.Security.AccessControl.ResourceType resourceType, System.Runtime.InteropServices.SafeHandle? safeHandle, System.Security.AccessControl.AccessControlSections includeSections, System.Security.AccessControl.NativeObjectSecurity.ExceptionFromErrorCode? exceptionFromErrorCode, object? exceptionContext) : base (default(bool), default(System.Security.AccessControl.ResourceType)) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 429protected internal void Persist(System.Runtime.InteropServices.SafeHandle handle) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); }
System.Security.Cryptography (26)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
59internal static partial int FStat(SafeHandle fd, out FileStatus output);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Encode.cs (2)
21where THandle : SafeHandle 52where THandle : SafeHandle
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
90internal static void CheckValidOpenSslHandle(SafeHandle handle)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (3)
13private SafeHandle? _parent; 27SafeHandle parent = _parent; 48internal void TransferOwnershipToParent(SafeHandle parent)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeHandleCache.cs (4)
13internal static class SafeHandleCache<T> where T : SafeHandle 19/// or it should override <see cref="SafeHandle.Dispose(bool)"/> to prevent disposal when the 20/// instance represents an invalid handle: <see cref="System.Runtime.InteropServices.SafeHandle.IsInvalid"/> returns <see language="true"/>. 49internal static bool IsCachedInvalidHandle(SafeHandle handle)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (5)
12private SafeHandle? _parent; 21SafeHandle? parent = _parent; 42internal void SetParent(SafeHandle parent) 55where TExteriorHandle : SafeHandle 72where TExteriorHandle : SafeHandle
System\Security\Cryptography\Cng.NotSupported.cs (2)
21protected SafeNCryptHandle(IntPtr handle, SafeHandle parentHandle) : base(default(bool)) 39public SafeNCryptKeyHandle(IntPtr handle, SafeHandle parentHandle)
System\Security\Cryptography\DSAOpenSsl.cs (1)
31/// <paramref name="pkeyHandle"/> <see cref="Runtime.InteropServices.SafeHandle.IsInvalid" />
System\Security\Cryptography\ECDiffieHellmanOpenSsl.cs (1)
18/// <exception cref="ArgumentException"><paramref name="pkeyHandle"/> <see cref="SafeHandle.IsInvalid" /></exception>
System\Security\Cryptography\ECDsaOpenSsl.cs (1)
18/// <exception cref="ArgumentException"><paramref name="pkeyHandle"/> <see cref="SafeHandle.IsInvalid" /></exception>
System\Security\Cryptography\RSAOpenSsl.cs (1)
60/// <paramref name="pkeyHandle"/> <see cref="Runtime.InteropServices.SafeHandle.IsInvalid" />
System\Security\Cryptography\X509Certificates\IStorePal.cs (1)
13SafeHandle? SafeHandle { get; }
System\Security\Cryptography\X509Certificates\OpenSslCachedSystemStoreProvider.cs (1)
85public SafeHandle? SafeHandle => null;
System\Security\Cryptography\X509Certificates\OpenSslDirectoryBasedStoreProvider.cs (1)
256SafeHandle? IStorePal.SafeHandle
System\Security\Cryptography\X509Certificates\UnsupportedDisallowedStore.cs (1)
56SafeHandle? IStorePal.SafeHandle { get; }
System.ServiceProcess.ServiceController (1)
artifacts\obj\System.ServiceProcess.ServiceController\Debug\net10.0\System.ServiceProcess.ServiceController.notsupported.cs (1)
72public System.Runtime.InteropServices.SafeHandle ServiceHandle { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_ServiceController); } }
UIAutomationTypes (4)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\HandleCollector.cs (4)
26internal static SafeHandle Add(SafeHandle handle, int type) { 65internal static SafeHandle Remove(SafeHandle handle, int type) {