77 types derived from SafeHandle
Infrastructure.Common (1)
SafeKeychainHandle.cs (1)
13public class SafeKeychainHandle : SafeHandle
NuGet.Packaging (2)
Signing\Cms\NativeMethods.cs (2)
131internal sealed class SafeCryptMsgHandle : SafeHandle 158internal sealed class SafeLocalAllocHandle : 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.Data.OleDb (5)
DbPropSet.cs (1)
12internal sealed class DBPropSet : SafeHandle
PropertyInfoSet.cs (1)
27internal sealed class PropertyInfoSet : SafeHandle
SafeHandles.cs (1)
18internal sealed class DualCoTaskMem : SafeHandle
System\Data\ProviderBase\DbBuffer.cs (1)
13internal abstract class DbBuffer : SafeHandle
System\Data\ProviderBase\WrappedIUnknown.cs (1)
15internal class WrappedIUnknown : SafeHandle
System.Diagnostics.EventLog (3)
System\Diagnostics\Reader\CoTaskMemSafeHandle.cs (1)
11internal sealed class CoTaskMemSafeHandle : SafeHandle
System\Diagnostics\Reader\CoTaskMemUnicodeSafeHandle.cs (1)
11internal sealed class CoTaskMemUnicodeSafeHandle : SafeHandle
System\Diagnostics\Reader\EventLogHandle.cs (1)
12internal sealed class EventLogHandle : SafeHandle
System.DirectoryServices (1)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeTokenHandle.cs (1)
12internal sealed class SafeTokenHandle : SafeHandle
System.DirectoryServices.AccountManagement (2)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeTokenHandle.cs (1)
12internal sealed class SafeTokenHandle : SafeHandle
System\DirectoryServices\AccountManagement\AuthZSet.cs (1)
520private sealed class SafeMemoryPtr : SafeHandle
System.Drawing.Common (1)
System\Drawing\Printing\PrintController.SafeDeviceModeHandle.cs (1)
19internal sealed class SafeDeviceModeHandle : SafeHandle
System.IO.Compression (5)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeZstdHandle.cs (4)
12internal sealed class SafeZstdCompressHandle : SafeHandle 87internal sealed class SafeZstdDecompressHandle : SafeHandle 162internal sealed class SafeZstdCDictHandle : SafeHandle 178internal sealed class SafeZstdDDictHandle : SafeHandle
src\runtime\src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (1)
191public sealed class ZLibStreamHandle : SafeHandle
System.IO.Compression.Brotli (2)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBrotliHandle.cs (2)
9internal sealed class SafeBrotliEncoderHandle : SafeHandle 22internal sealed class SafeBrotliDecoderHandle : SafeHandle
System.IO.FileSystem.AccessControl (1)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeFindHandle.Windows.cs (1)
9internal sealed class SafeFindHandle : SafeHandle
System.Net.Quic (11)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Stack.cs (1)
64internal sealed class SafeX509StackHandle : SafeHandle
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509StoreCtx.cs (1)
72internal sealed class SafeX509StoreCtxHandle : SafeHandle
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (2)
9internal sealed class SafeAsn1ObjectHandle : SafeHandle 29internal sealed class SafeAsn1OctetStringHandle : SafeHandle
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (1)
11internal sealed class SafeBioHandle : SafeHandle
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (1)
10internal abstract class SafeInteriorHandle : SafeHandle
src\runtime\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\runtime\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\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtx.cs (1)
80internal sealed class SafeSslContextHandle : SafeHandle, ISafeHandleCachable
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Stack.cs (1)
64internal sealed class SafeX509StackHandle : SafeHandle
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509StoreCtx.cs (1)
72internal sealed class SafeX509StoreCtxHandle : SafeHandle
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (2)
9internal sealed class SafeAsn1ObjectHandle : SafeHandle 29internal sealed class SafeAsn1OctetStringHandle : SafeHandle
src\runtime\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\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (1)
11internal sealed class SafeBioHandle : SafeHandle
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (1)
10internal abstract class SafeInteriorHandle : SafeHandle
src\runtime\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\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (1)
10internal sealed class SafeX509ExtensionHandle : SafeHandle
System.Net.WebSockets (1)
src\runtime\src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (1)
191public sealed class ZLibStreamHandle : SafeHandle
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeHandleMinusOneIsInvalid.cs (1)
10public abstract class SafeHandleMinusOneIsInvalid : SafeHandle
src\runtime\src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeHandleZeroOrMinusOneIsInvalid.cs (1)
10public abstract class SafeHandleZeroOrMinusOneIsInvalid : SafeHandle
System.Security.AccessControl (1)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeTokenHandle.cs (1)
12internal sealed class SafeTokenHandle : SafeHandle
System.Security.Cryptography (5)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBCryptHandle.cs (1)
11internal abstract class SafeBCryptHandle : SafeHandle, IDisposable
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeCrypt32Handle.cs (1)
12internal abstract class SafeCrypt32Handle<T> : SafeHandle where T : SafeHandle, new()
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeUnicodeStringHandle.cs (1)
13internal sealed class SafeUnicodeStringHandle : SafeHandle
System\Security\Cryptography\FixedMemoryKeyBox.cs (1)
8internal sealed unsafe class FixedMemoryKeyBox : SafeHandle
System\Security\Cryptography\OpenSsl.NotSupported.cs (1)
236public sealed class SafeEvpPKeyHandle : SafeHandle
System.Security.Cryptography.Pkcs (3)
Microsoft\Win32\SafeHandles\SafeCertContextHandle.cs (1)
12internal sealed class SafeCertContextHandle : SafeHandle
Microsoft\Win32\SafeHandles\SafeCryptMsgHandle.cs (1)
10internal sealed class SafeCryptMsgHandle : SafeHandle
Microsoft\Win32\SafeHandles\SafeProvOrNCryptKeyHandle.cs (1)
19internal abstract class SafeProvOrNCryptKeyHandle : SafeHandle
System.Security.Principal.Windows (2)
Microsoft\Win32\SafeHandles\SafeAccessTokenHandle.cs (1)
10public sealed class SafeAccessTokenHandle : SafeHandle
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeLsaHandle.cs (1)
10internal sealed class SafeLsaHandle : SafeHandle
System.ServiceProcess.ServiceController (1)
Microsoft\Win32\SafeHandles\SafeServiceHandle.cs (1)
12internal sealed class SafeServiceHandle : SafeHandle
System.Speech (1)
Internal\HGlobalSafeHandle.cs (1)
11internal sealed class HGlobalSafeHandle : SafeHandle
System.Windows.Extensions (1)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeCrypt32Handle.cs (1)
12internal abstract class SafeCrypt32Handle<T> : SafeHandle where T : SafeHandle, new()
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
507 references to SafeHandle
Microsoft.AspNetCore.Cryptography.Internal (7)
_generated\0\LibraryImports.g.cs (4)
790public static partial bool CryptProtectMemory(global::System.Runtime.InteropServices.SafeHandle pData, uint cbData, uint dwFlags) 797global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __pData_native__marshaller = new(); 887public static partial bool CryptUnprotectMemory(global::System.Runtime.InteropServices.SafeHandle pData, uint cbData, uint dwFlags) 894global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __pData_native__marshaller = new();
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.Build.Framework (1)
FileSystem\WindowsNative.cs (1)
267public 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.Win32.Registry (1)
System\Security\AccessControl\RegistrySecurity.cs (1)
98private static Exception? _HandleErrorCode(int errorCode, string? name, SafeHandle? handle, object? context)
mscorlib (1)
src\runtime\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 ) 139internal SafeHandle Handle 340private 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 (17)
_generated\0\LibraryImports.g.cs (10)
428internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output) 435global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 551internal static unsafe partial int Read(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count) 557global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 589internal static unsafe partial int ReadFromNonblocking(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count) 595global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 627internal static unsafe partial int Write(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize) 633global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 688internal static unsafe partial int WriteToNonblocking(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize) 694global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
src\runtime\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\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Read.cs (2)
22internal static unsafe partial int Read(SafeHandle fd, byte* buffer, int count); 25internal static unsafe partial int ReadFromNonblocking(SafeHandle fd, byte* buffer, int count);
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
60internal static partial int FStat(SafeHandle fd, out FileStatus output);
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Write.cs (2)
22internal static unsafe partial int Write(SafeHandle fd, byte* buffer, int bufferSize); 28internal static unsafe partial int WriteToNonblocking(SafeHandle fd, byte* buffer, int bufferSize);
System.Data.OleDb (9)
UnsafeNativeMethods.cs (9)
222[In] /*tagDBBINDING[]*/SafeHandle rgBindings, 302[In] SafeHandle rgOptColumns, 337[In] SafeHandle? rgPropertyIDSets, 349[In] SafeHandle rgPropertySets); 455[In] SafeHandle? rgPropertyIDSets, 462[In] SafeHandle rgPropertyIDSets, 470[In] SafeHandle rgPropertySets); 703[In] SafeHandle rghRows, 724[In] SafeHandle? rgPropertyIDSets,
System.Diagnostics.FileVersionInfo (3)
_generated\0\LibraryImports.g.cs (2)
31internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output) 38global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
60internal static partial int FStat(SafeHandle fd, out FileStatus output);
System.Diagnostics.PerformanceCounter (6)
_generated\0\LibraryImports.g.cs (4)
328internal static partial bool DuplicateHandle(nint hSourceProcessHandle, global::System.Runtime.InteropServices.SafeHandle hSourceHandle, nint hTargetProcess, out global::Microsoft.Win32.SafeHandles.SafeWaitHandle targetHandle, int dwDesiredAccess, bool bInheritHandle, int dwOptions) 340global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __hSourceHandle_native__marshaller = new(); 695internal static partial nuint VirtualQuery(global::System.Runtime.InteropServices.SafeHandle lpAddress, ref global::Interop.Kernel32.MEMORY_BASIC_INFORMATION lpBuffer, nuint dwLength) 701global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __lpAddress_native__marshaller = new();
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.DuplicateHandle_SafeWaitHandle.cs (1)
16SafeHandle hSourceHandle,
src\runtime\src\libraries\Common\src\Interop\Windows\Kernel32\Interop.VirtualQuery.cs (1)
13SafeHandle lpAddress,
System.Diagnostics.Process (38)
_generated\0\LibraryImports.g.cs (14)
67internal static partial int SetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, int isNonBlocking) 73global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 108internal static partial int GetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, out bool isNonBlocking) 116global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 154internal static partial int SetFD(global::System.Runtime.InteropServices.SafeHandle fd, int flags) 160global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 195internal static partial int GetFD(global::System.Runtime.InteropServices.SafeHandle fd) 201global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 260internal static unsafe partial int Read(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count) 266global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 298internal static unsafe partial int ReadFromNonblocking(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count) 304global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 996internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output) 1003global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
Microsoft\Win32\SafeHandles\SafeProcessHandle.cs (1)
84startInfo.ThrowIfInvalid(out bool anyRedirection, out SafeHandle[]? inheritedHandles);
Microsoft\Win32\SafeHandles\SafeProcessHandle.Unix.cs (3)
174private static SafeProcessHandle StartCore(ProcessStartInfo startInfo, SafeFileHandle? stdinHandle, SafeFileHandle? stdoutHandle, SafeFileHandle? stderrHandle, SafeHandle[]? inheritedHandlesSnapshot = null) 178SafeFileHandle? stderrHandle, SafeHandle[]? inheritedHandles, out ProcessWaitState.Holder? waitStateHolder) 298bool usesTerminal, SafeHandle[]? inheritedHandles, out ProcessWaitState.Holder? waitStateHolder, bool throwOnNoExec = true)
src\runtime\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\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.ForkAndExecProcess.cs (2)
20bool startDetached, bool killOnParentExit, SafeHandle[]? inheritedHandles = null) 63SafeHandle handle = inheritedHandles[i];
src\runtime\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\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Read.cs (2)
22internal static unsafe partial int Read(SafeHandle fd, byte* buffer, int count); 25internal static unsafe partial int ReadFromNonblocking(SafeHandle fd, byte* buffer, int count);
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
60internal static partial int FStat(SafeHandle fd, out FileStatus output);
System\Diagnostics\Process.cs (1)
1165startInfo.ThrowIfInvalid(out bool anyRedirection, out SafeHandle[]? inheritedHandles);
System\Diagnostics\Process.Unix.cs (1)
361private bool StartCore(ProcessStartInfo startInfo, SafeFileHandle? stdinHandle, SafeFileHandle? stdoutHandle, SafeFileHandle? stderrHandle, SafeHandle[]? inheritedHandles)
System\Diagnostics\ProcessStartInfo.cs (8)
264/// A list of <see cref="SafeHandle"/> objects to be explicitly inherited by the child process, 267public IList<SafeHandle>? InheritedHandles { get; set; } 405internal void ThrowIfInvalid(out bool anyRedirection, out SafeHandle[]? inheritedHandles) 465IList<SafeHandle> list = InheritedHandles; 466SafeHandle[] snapshot = new SafeHandle[list.Count]; 469SafeHandle? handle = list[i]; 547SafeFileHandle? stderrHandle, SafeHandle[]? inheritedHandles = null)
System.Formats.Tar (4)
_generated\0\LibraryImports.g.cs (2)
278internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output) 285global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
60internal static partial int FStat(SafeHandle fd, out FileStatus output);
System.IO.Compression (5)
_generated\0\LibraryImports.g.cs (2)
117internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output) 124global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
60internal static partial int FStat(SafeHandle fd, out FileStatus output);
src\runtime\src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (2)
182/// <see cref="SafeHandle" />. This would save an <see cref="IntPtr" /> field since 183/// <see cref="ZLibStreamHandle" /> does not actually use its <see cref="SafeHandle.handle" /> field.
System.IO.FileSystem.AccessControl (1)
System\Security\AccessControl\FileSystemSecurity.cs (1)
30private static Exception? _HandleErrorCode(int errorCode, string? name, SafeHandle? handle, object? context)
System.IO.FileSystem.DriveInfo (1)
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
System.IO.FileSystem.Watcher (11)
_generated\0\LibraryImports.g.cs (6)
7internal static unsafe partial int Read(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count) 13global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 45internal static unsafe partial int ReadFromNonblocking(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count) 51global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 278internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output) 285global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
src\runtime\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\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Read.cs (2)
22internal static unsafe partial int Read(SafeHandle fd, byte* buffer, int count); 25internal static unsafe partial int ReadFromNonblocking(SafeHandle fd, byte* buffer, int count);
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
60internal static partial int FStat(SafeHandle fd, out FileStatus output);
System.IO.MemoryMappedFiles (13)
_generated\0\LibraryImports.g.cs (8)
82internal static partial int SetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, int isNonBlocking) 88global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 123internal static partial int GetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, out bool isNonBlocking) 131global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 169internal static partial int SetFD(global::System.Runtime.InteropServices.SafeHandle fd, int flags) 175global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 210internal static partial int GetFD(global::System.Runtime.InteropServices.SafeHandle fd) 216global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
src\runtime\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);
System.IO.Pipes (23)
_generated\0\LibraryImports.g.cs (12)
175internal static partial int SetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, int isNonBlocking) 181global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 216internal static partial int GetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, out bool isNonBlocking) 224global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 262internal static partial int SetFD(global::System.Runtime.InteropServices.SafeHandle fd, int flags) 268global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 303internal static partial int GetFD(global::System.Runtime.InteropServices.SafeHandle fd) 309global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 701internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output) 708global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 865internal static partial int GetPeerID(global::System.Runtime.InteropServices.SafeHandle socket, out uint euid) 872global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new();
Microsoft\Win32\SafeHandles\SafePipeHandle.Unix.cs (2)
26private SafeHandle? _pipeSocketHandle; 37internal SafeHandle? PipeSocketHandle => _pipeSocketHandle;
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
src\runtime\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\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPeerID.cs (1)
12internal static partial int GetPeerID(SafeHandle socket, out uint euid);
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
60internal 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.Ports (8)
_generated\0\LibraryImports.g.cs (4)
482internal static unsafe partial int Read(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count) 488global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 521internal static unsafe partial int Write(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize) 527global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
src\runtime\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\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
141if (value is SafeHandle handle)
System.Net.Http.WinHttpHandler (1)
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
141if (value is SafeHandle handle)
System.Net.HttpListener (1)
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
141if (value is SafeHandle handle)
System.Net.Mail (1)
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
141if (value is SafeHandle handle)
System.Net.NameResolution (1)
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
141if (value is SafeHandle handle)
System.Net.NetworkInformation (3)
_generated\0\LibraryImports.g.cs (2)
132public static unsafe partial global::Interop.Error ReadEvents(global::System.Runtime.InteropServices.SafeHandle socket, delegate* unmanaged<nint, global::Interop.Sys.NetworkChangeKind, void> onNetworkChange) 137global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new();
src\runtime\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 (3)
_generated\0\LibraryImports.g.cs (2)
31internal static unsafe partial global::System.Net.Sockets.SocketError ReceiveSocketError(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.MessageHeader* messageHeader) 36global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new();
src\runtime\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\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
141if (value is SafeHandle handle)
System.Net.Quic (16)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
91internal static void CheckValidOpenSslHandle(SafeHandle handle)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (3)
13private SafeHandle? _parent; 27SafeHandle parent = _parent; 48internal void TransferOwnershipToParent(SafeHandle parent)
src\runtime\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\runtime\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\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
141if (value is SafeHandle handle)
src\runtime\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\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
141if (value is SafeHandle handle)
System.Net.Security (16)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
91internal static void CheckValidOpenSslHandle(SafeHandle handle)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (3)
13private SafeHandle? _parent; 27SafeHandle parent = _parent; 48internal void TransferOwnershipToParent(SafeHandle parent)
src\runtime\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\runtime\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\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
141if (value is SafeHandle handle)
src\runtime\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 (120)
_generated\0\LibraryImports.g.cs (78)
39internal static partial global::Interop.Error TryChangeSocketEventRegistration(nint port, global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.SocketEvents currentEvents, global::Interop.Sys.SocketEvents newEvents, nint data) 44global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 113internal static unsafe partial global::Interop.Error Accept(global::System.Runtime.InteropServices.SafeHandle socket, byte* socketAddress, int* socketAddressLen, nint* acceptedFd) 118global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 147private static partial global::Interop.Error Bind(global::System.Runtime.InteropServices.SafeHandle socket, global::System.Net.Sockets.ProtocolType socketProtocolType, global::System.ReadOnlySpan<byte> socketAddress, int socketAddressLen) 152global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 206internal static unsafe partial global::Interop.Error Connect(global::System.Runtime.InteropServices.SafeHandle socket, byte* socketAddress, int socketAddressLen) 211global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 240internal static unsafe partial global::Interop.Error Connectx(global::System.Runtime.InteropServices.SafeHandle socket, byte* socketAddress, int socketAddressLen, global::System.Span<byte> buffer, int bufferLen, int enableTfo, int* sent) 245global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 304internal static partial int SetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, int isNonBlocking) 310global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 345internal static partial int GetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, out bool isNonBlocking) 353global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 391internal static partial int SetFD(global::System.Runtime.InteropServices.SafeHandle fd, int flags) 397global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 432internal static partial int GetFD(global::System.Runtime.InteropServices.SafeHandle fd) 438global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 505internal static unsafe partial global::Interop.Error GetBytesAvailable(global::System.Runtime.InteropServices.SafeHandle socket, int* available) 510global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 539internal static unsafe partial global::Interop.Error GetAtOutOfBandMark(global::System.Runtime.InteropServices.SafeHandle socket, int* atMark) 544global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 589internal static unsafe partial global::Interop.Error GetPeerName(global::System.Runtime.InteropServices.SafeHandle socket, byte* socketAddress, int* socketAddressLen) 594global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 623internal static unsafe partial global::Interop.Error GetSocketErrorOption(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Error* socketError) 628global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 703internal static unsafe partial global::Interop.Error GetSockName(global::System.Runtime.InteropServices.SafeHandle socket, byte* socketAddress, int* socketAddressLen) 708global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 737internal static unsafe partial global::Interop.Error GetSockOpt(global::System.Runtime.InteropServices.SafeHandle socket, global::System.Net.Sockets.SocketOptionLevel optionLevel, global::System.Net.Sockets.SocketOptionName optionName, byte* optionValue, int* optionLen) 742global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 779internal static unsafe partial global::Interop.Error GetRawSockOpt(global::System.Runtime.InteropServices.SafeHandle socket, int optionLevel, int optionName, byte* optionValue, int* optionLen) 784global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 846internal static unsafe partial global::Interop.Error GetLingerOption(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.LingerOption* option) 851global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 880internal static unsafe partial global::Interop.Error SetLingerOption(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.LingerOption* option) 885global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 922internal static partial global::Interop.Error SendFile(global::System.Runtime.InteropServices.SafeHandle out_fd, global::System.Runtime.InteropServices.SafeHandle in_fd, long offset, long count, out long sent) 930global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __in_fd_native__marshaller = new(); 931global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __out_fd_native__marshaller = new(); 968internal static partial global::Interop.Error SetSendTimeout(global::System.Runtime.InteropServices.SafeHandle socket, int millisecondsTimeout) 973global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 1002internal static partial global::Interop.Error SetReceiveTimeout(global::System.Runtime.InteropServices.SafeHandle socket, int millisecondsTimeout) 1007global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 1036internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output) 1043global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 1159internal static partial global::Interop.Error Listen(global::System.Runtime.InteropServices.SafeHandle socket, int backlog) 1164global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 1193internal static unsafe partial global::Interop.Error GetIPv4MulticastOption(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.MulticastOption multicastOption, global::Interop.Sys.IPv4MulticastOption* option) 1198global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 1227internal static unsafe partial global::Interop.Error SetIPv4MulticastOption(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.MulticastOption multicastOption, global::Interop.Sys.IPv4MulticastOption* option) 1232global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 1261internal static unsafe partial global::Interop.Error GetIPv6MulticastOption(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.MulticastOption multicastOption, global::Interop.Sys.IPv6MulticastOption* option) 1266global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 1295internal static unsafe partial global::Interop.Error SetIPv6MulticastOption(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.MulticastOption multicastOption, global::Interop.Sys.IPv6MulticastOption* option) 1300global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 1345internal static unsafe partial int Read(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count) 1351global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 1383internal static unsafe partial int ReadFromNonblocking(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count) 1389global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 1421internal static unsafe partial global::Interop.Error Receive(global::System.Runtime.InteropServices.SafeHandle socket, byte* buffer, int bufferLen, global::System.Net.Sockets.SocketFlags flags, int* received) 1426global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 1455internal static unsafe partial global::Interop.Error ReceiveMessage(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.MessageHeader* messageHeader, global::System.Net.Sockets.SocketFlags flags, long* received) 1460global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 1489internal static unsafe partial global::Interop.Error Send(global::System.Runtime.InteropServices.SafeHandle socket, byte* buffer, int bufferLen, global::System.Net.Sockets.SocketFlags flags, int* sent) 1494global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 1548internal static unsafe partial global::Interop.Error SendMessage(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.MessageHeader* messageHeader, global::System.Net.Sockets.SocketFlags flags, long* sent) 1553global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 1582internal static unsafe partial global::Interop.Error SetSockOpt(global::System.Runtime.InteropServices.SafeHandle socket, global::System.Net.Sockets.SocketOptionLevel optionLevel, global::System.Net.Sockets.SocketOptionName optionName, byte* optionValue, int optionLen) 1587global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 1624internal static unsafe partial global::Interop.Error SetRawSockOpt(global::System.Runtime.InteropServices.SafeHandle socket, int optionLevel, int optionName, byte* optionValue, int optionLen) 1629global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 1658internal static partial global::Interop.Error Shutdown(global::System.Runtime.InteropServices.SafeHandle socket, global::System.Net.Sockets.SocketShutdown how) 1663global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new(); 1803internal static unsafe partial int Write(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize) 1809global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 1864internal static unsafe partial int WriteToNonblocking(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize) 1870global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
src\runtime\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\runtime\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\runtime\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\runtime\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\runtime\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\runtime\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\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetSocketErrorOption.cs (1)
13internal static unsafe partial Error GetSocketErrorOption(SafeHandle socket, Error* socketError);
src\runtime\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\runtime\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\runtime\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\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Listen.cs (1)
12internal static partial Error Listen(SafeHandle socket, int backlog);
src\runtime\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\runtime\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\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Read.cs (2)
22internal static unsafe partial int Read(SafeHandle fd, byte* buffer, int count); 25internal static unsafe partial int ReadFromNonblocking(SafeHandle fd, byte* buffer, int count);
src\runtime\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\runtime\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\runtime\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\runtime\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\runtime\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\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.SetReceiveTimeout.cs (1)
13internal static partial Error SetReceiveTimeout(SafeHandle socket, int millisecondsTimeout);
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.SetSendTimeout.cs (1)
13internal static partial Error SetSendTimeout(SafeHandle socket, int millisecondsTimeout);
src\runtime\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\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Shutdown.cs (1)
13internal static partial Error Shutdown(SafeHandle socket, SocketShutdown how);
src\runtime\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\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
60internal static partial int FStat(SafeHandle fd, out FileStatus output);
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Write.cs (2)
22internal static unsafe partial int Write(SafeHandle fd, byte* buffer, int bufferSize); 28internal static unsafe partial int WriteToNonblocking(SafeHandle fd, byte* buffer, int bufferSize);
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
141if (value is SafeHandle handle)
System.Net.WebSockets (3)
src\runtime\src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (2)
182/// <see cref="SafeHandle" />. This would save an <see cref="IntPtr" /> field since 183/// <see cref="ZLibStreamHandle" /> does not actually use its <see cref="SafeHandle.handle" /> field.
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
141if (value is SafeHandle handle)
System.Private.CoreLib (70)
_generated\2\LibraryImports.g.cs (36)
2002internal static partial int SetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, int isNonBlocking) 2008global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 2043internal static partial int GetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, out bool isNonBlocking) 2051global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 2089internal static partial int SetFD(global::System.Runtime.InteropServices.SafeHandle fd, int flags) 2095global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 2130internal static partial int GetFD(global::System.Runtime.InteropServices.SafeHandle fd) 2136global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 2878internal static partial int FChflags(global::System.Runtime.InteropServices.SafeHandle fd, uint flags) 2884global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 2975internal static partial int LockFileRegion(global::System.Runtime.InteropServices.SafeHandle fd, long offset, long length, global::Interop.Sys.LockType lockType) 2981global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 3532internal static unsafe partial int PRead(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize, long fileOffset) 3538global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 3570internal static unsafe partial long ReadV(global::System.Runtime.InteropServices.SafeHandle fd, global::Interop.Sys.IOVector* vectors, int vectorCount) 3576global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 3608internal static unsafe partial long PReadV(global::System.Runtime.InteropServices.SafeHandle fd, global::Interop.Sys.IOVector* vectors, int vectorCount, long fileOffset) 3614global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 3646internal static unsafe partial int PWrite(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize, long fileOffset) 3652global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 3684internal static unsafe partial long PWriteV(global::System.Runtime.InteropServices.SafeHandle fd, global::Interop.Sys.IOVector* vectors, int vectorCount, long fileOffset) 3690global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 3722internal static unsafe partial int Read(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count) 3728global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 3760internal static unsafe partial int ReadFromNonblocking(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count) 3766global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 3798internal static unsafe partial long WriteV(global::System.Runtime.InteropServices.SafeHandle fd, global::Interop.Sys.IOVector* vectors, int vectorCount) 3804global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 4034internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output) 4041global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 4448internal static unsafe partial int FUTimens(global::System.Runtime.InteropServices.SafeHandle fd, global::Interop.Sys.TimeSpec* times) 4454global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 4486internal static unsafe partial int Write(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize) 4492global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new(); 4547internal static unsafe partial int WriteToNonblocking(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize) 4553global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (1)
95where TSafeHandle : SafeHandle
src\runtime\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\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.LChflags.cs (1)
21internal static partial int FChflags(SafeHandle fd, uint flags);
src\runtime\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\runtime\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\runtime\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\runtime\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\runtime\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\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Read.cs (2)
22internal static unsafe partial int Read(SafeHandle fd, byte* buffer, int count); 25internal static unsafe partial int ReadFromNonblocking(SafeHandle fd, byte* buffer, int count);
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.ReadV.cs (1)
11internal static unsafe partial long ReadV(SafeHandle fd, IOVector* vectors, int vectorCount);
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Stat.cs (1)
60internal static partial int FStat(SafeHandle fd, out FileStatus output);
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.UTimensat.cs (1)
29internal static unsafe partial int FUTimens(SafeHandle fd, TimeSpec* times);
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.Write.cs (2)
22internal static unsafe partial int Write(SafeHandle fd, byte* buffer, int bufferSize); 28internal static unsafe partial int WriteToNonblocking(SafeHandle fd, byte* buffer, int bufferSize);
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.WriteV.cs (1)
11internal static unsafe partial long WriteV(SafeHandle fd, IOVector* vectors, int vectorCount);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (3)
1352/// Initializes the underlying handle of a newly created <see cref="SafeHandle" /> to the provided value. 1354/// <param name="safeHandle">The <see cref="SafeHandle"/> instance to update.</param> 1356public static void InitHandle(SafeHandle safeHandle, IntPtr handle)
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPool.Unix.cs (1)
108public static bool BindHandle(SafeHandle osHandle) =>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandle.PlatformNotSupported.cs (2)
11public SafeHandle Handle => null!; 18public static ThreadPoolBoundHandle BindHandle(SafeHandle handle)
src\runtime\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>
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
698[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)
src\runtime\artifacts\obj\System.Runtime.InteropServices\Release\net11.0\System.Runtime.InteropServices.Forwards.cs (1)
135[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.SafeHandle))]
System.Security.AccessControl (19)
_generated\0\LibraryImports.g.cs (4)
126internal static unsafe partial uint GetSecurityInfoByHandle(global::System.Runtime.InteropServices.SafeHandle handle, uint objectType, uint securityInformation, nint* sidOwner, nint* sidGroup, nint* dacl, nint* sacl, nint* securityDescriptor) 131global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __handle_native__marshaller = new(); 160internal static partial uint SetSecurityInfoByHandle(global::System.Runtime.InteropServices.SafeHandle handle, uint objectType, uint securityInformation, byte[] owner, byte[] group, byte[] dacl, byte[] sacl) 166global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __handle_native__marshaller = new();
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.GetSecurityInfoByHandle.cs (1)
13SafeHandle handle,
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.SetSecurityInfoByHandle.cs (1)
13SafeHandle handle,
System\Security\AccessControl\NativeObjectSecurity.cs (7)
42protected internal delegate System.Exception? ExceptionFromErrorCode(int errorCode, string? name, SafeHandle? handle, object? context); 83protected NativeObjectSecurity(bool isContainer, ResourceType resourceType, SafeHandle? handle, AccessControlSections includeSections, ExceptionFromErrorCode? exceptionFromErrorCode, object? exceptionContext) 88protected NativeObjectSecurity(bool isContainer, ResourceType resourceType, SafeHandle? handle, AccessControlSections includeSections) 97private static CommonSecurityDescriptor CreateInternal(ResourceType resourceType, bool isContainer, string? name, SafeHandle? handle, AccessControlSections includeSections, bool createByName, ExceptionFromErrorCode? exceptionFromErrorCode, object? exceptionContext) 181private void Persist(string? name, SafeHandle? handle, AccessControlSections includeSections, object? exceptionContext) 359protected sealed override void Persist(SafeHandle handle, AccessControlSections includeSections) 364protected void Persist(SafeHandle handle, AccessControlSections includeSections, object? exceptionContext)
System\Security\AccessControl\ObjectSecurity.cs (1)
323protected virtual void Persist(SafeHandle handle, AccessControlSections includeSections)
System\Security\AccessControl\ObjectSecurityT.cs (3)
229protected ObjectSecurity(bool isContainer, ResourceType resourceType, SafeHandle? safeHandle, AccessControlSections includeSections) 233protected ObjectSecurity(bool isContainer, ResourceType resourceType, SafeHandle? safeHandle, AccessControlSections includeSections, ExceptionFromErrorCode? exceptionFromErrorCode, object? exceptionContext) 304protected internal void Persist(SafeHandle handle)
System\Security\AccessControl\Win32.cs (2)
72SafeHandle? handle, 212SafeHandle? handle,
System.Security.Cryptography (22)
_generated\0\LibraryImports.g.cs (4)
634public static partial bool CryptSetProvParam(global::System.Runtime.InteropServices.SafeHandle safeProvHandle, global::Interop.Advapi32.CryptProvParam dwParam, nint pbData, int dwFlags) 641global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __safeProvHandle_native__marshaller = new(); 720public static partial bool CryptGetProvParam(global::System.Runtime.InteropServices.SafeHandle safeProvHandle, global::Interop.Advapi32.CryptProvParam dwParam, nint pbData, ref int dwDataLen, int dwFlags) 727global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __safeProvHandle_native__marshaller = new();
Microsoft\Win32\SafeHandles\NCryptSafeHandles.cs (3)
67private SafeHandle? _parentHandle; 75protected SafeNCryptHandle(IntPtr handle, SafeHandle parentHandle) 357public SafeNCryptKeyHandle(IntPtr handle, SafeHandle parentHandle)
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.CryptGetProvParam.cs (3)
28SafeHandle safeProvHandle, 44SafeHandle safeProvHandle, 51SafeHandle safeProvHandle,
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeCrypt32Handle.cs (1)
12internal abstract class SafeCrypt32Handle<T> : SafeHandle where T : SafeHandle, new()
src\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\CertificateHelpers.Windows.cs (1)
22private static partial SafeNCryptKeyHandle CreateSafeNCryptKeyHandle(IntPtr handle, SafeHandle parentHandle);
System\Security\Cryptography\X509Certificates\CertificateHelpers.Windows.cs (1)
19private static partial SafeNCryptKeyHandle CreateSafeNCryptKeyHandle(IntPtr handle, SafeHandle parentHandle) =>
System\Security\Cryptography\X509Certificates\ChainPal.Windows.BuildChain.cs (2)
42using (SafeHandle applicationPolicyOids = applicationPolicy!.ToLpstrArray(out applicationPolicyCount)) 52using (SafeHandle certificatePolicyOids = certificatePolicy!.ToLpstrArray(out certificatePolicyCount))
System\Security\Cryptography\X509Certificates\IStorePal.cs (1)
13SafeHandle? SafeHandle { get; }
System\Security\Cryptography\X509Certificates\StorePal.Windows.cs (1)
93SafeHandle IStorePal.SafeHandle
System\Security\Cryptography\X509Certificates\WindowsHelpers.cs (1)
21public static SafeHandle ToLpstrArray(this OidCollection? oids, out int numOids)
System.Security.Cryptography.Pkcs (27)
_generated\0\LibraryImports.g.cs (4)
113public static partial bool CryptSetProvParam(global::System.Runtime.InteropServices.SafeHandle safeProvHandle, global::Interop.Advapi32.CryptProvParam dwParam, nint pbData, int dwFlags) 120global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __safeProvHandle_native__marshaller = new(); 201public static partial bool CryptGetProvParam(global::System.Runtime.InteropServices.SafeHandle safeProvHandle, global::Interop.Advapi32.CryptProvParam dwParam, nint pbData, ref int dwDataLen, int dwFlags) 208global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __safeProvHandle_native__marshaller = new();
Internal\Cryptography\Pal\Windows\DecryptorPalWindows.Decode.cs (1)
53using (SafeHandle sh = hCryptMsg.GetMsgParamAsMemory(CryptMsgParamType.CMSG_ENVELOPE_ALGORITHM_PARAM))
Internal\Cryptography\Pal\Windows\DecryptorPalWindows.DecodeRecipients.cs (2)
28SafeHandle pCmsgCmsRecipientInfoMemory = hCryptMsg.GetMsgParamAsMemory(CryptMsgParamType.CMSG_CMS_RECIPIENT_INFO_PARAM, index); 36private static IEnumerable<RecipientInfo> ToRecipientInfosForThisIndex(SafeHandle pCmsgCmsRecipientInfoMemory, int index)
Internal\Cryptography\Pal\Windows\HelpersWindows.cs (4)
50public static SafeHandle GetMsgParamAsMemory(this SafeCryptMsgHandle hCryptMsg, CryptMsgParamType paramType, int index = 0) 58SafeHandle pvData = SafeHeapAllocHandle.Alloc(cbData); 293using (SafeHandle sh = Interop.Crypt32.CryptDecodeObjectToMemory(CryptDecodeObjectStructType.X509_OCTET_STRING, cryptAlgorithmIdentifier.Parameters.pbData, (int)cryptAlgorithmIdentifier.Parameters.cbData)) 348using (SafeHandle sh = hCryptMsg.GetMsgParamAsMemory(CryptMsgParamType.CMSG_UNPROTECTED_ATTR_PARAM))
Internal\Cryptography\Pal\Windows\KeyAgreeRecipientInfoPalWindows.cs (2)
16internal KeyAgreeRecipientInfoPalWindows(SafeHandle pCmsgCmsRecipientInfoMemory, int index, int subIndex) 181private readonly SafeHandle _pCmsgCmsRecipientInfoMemory;
Internal\Cryptography\Pal\Windows\KeyTransRecipientInfoPalWindows.cs (2)
17internal KeyTransRecipientInfoPalWindows(SafeHandle pCmsgCmsRecipientInfoMemory, int index) 106private readonly SafeHandle _pCmsgCmsRecipientInfoMemory;
Microsoft\Win32\SafeHandles\SafeProvOrNCryptKeyHandleUwp.cs (2)
18internal SafeProvOrNCryptKeyHandleUwp(IntPtr handle, SafeHandle parentHandle) 59private SafeHandle? _parentHandle;
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.CryptGetProvParam.cs (3)
28SafeHandle safeProvHandle, 44SafeHandle safeProvHandle, 51SafeHandle safeProvHandle,
src\runtime\src\libraries\Common\src\Interop\Windows\Crypt32\Interop.CryptEncodeDecodeWrappers.cs (3)
19internal static unsafe SafeHandle CryptDecodeObjectToMemory(CryptDecodeObjectStructType lpszStructType, byte[] pbEncoded) 27internal static unsafe SafeHandle CryptDecodeObjectToMemory(CryptDecodeObjectStructType lpszStructType, IntPtr pbEncoded, int cbEncoded) 36SafeHandle sh = SafeHeapAllocHandle.Alloc(cbRequired);
src\runtime\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)
System.ServiceProcess.ServiceController (1)
System\ServiceProcess\ServiceController.cs (1)
418public SafeHandle ServiceHandle
System.Threading.AccessControl (3)
System\Security\AccessControl\EventWaitHandleSecurity.cs (1)
129private static Exception? HandleErrorCode(int errorCode, string? name, SafeHandle? handle, object? context)
System\Security\AccessControl\MutexSecurity.cs (1)
123private static Exception? HandleErrorCode(int errorCode, string? name, SafeHandle? handle, object? context)
System\Security\AccessControl\SemaphoreSecurity.cs (1)
117private static Exception? HandleErrorCode(int errorCode, string? name, SafeHandle? handle, object? context)
System.Windows.Extensions (5)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeCrypt32Handle.cs (1)
12internal abstract class SafeCrypt32Handle<T> : SafeHandle where T : SafeHandle, new()
src\runtime\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)
UIAutomationTypes (4)
src\wpf\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) {