27 references to SafeLibraryHandle
Microsoft.AspNetCore.Cryptography.Internal (27)
Cng\OSVersionUtil.cs (2)
24
using
var
bcryptLibHandle =
SafeLibraryHandle
.Open(UnsafeNativeMethods.BCRYPT_LIB);
LibraryImports.g.cs (9)
10
public static partial int FormatMessage(uint dwFlags, global::Microsoft.AspNetCore.Cryptography.SafeHandles.
SafeLibraryHandle
lpSource, uint dwMessageId, uint dwLanguageId, out global::Microsoft.AspNetCore.Cryptography.SafeHandles.LocalAllocHandle lpBuffer, uint nSize, nint Arguments)
20
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Cryptography.SafeHandles.
SafeLibraryHandle
>.ManagedToUnmanagedIn __lpSource_native__marshaller = new();
94
internal static partial bool GetModuleHandleEx(uint dwFlags, global::Microsoft.AspNetCore.Cryptography.SafeHandles.
SafeLibraryHandle
lpModuleName, out nint phModule)
102
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Cryptography.SafeHandles.
SafeLibraryHandle
>.ManagedToUnmanagedIn __lpModuleName_native__marshaller = new();
143
internal static partial nint GetProcAddress(global::Microsoft.AspNetCore.Cryptography.SafeHandles.
SafeLibraryHandle
hModule, string lpProcName)
151
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Cryptography.SafeHandles.
SafeLibraryHandle
>.ManagedToUnmanagedIn __hModule_native__marshaller = new();
190
internal static partial global::Microsoft.AspNetCore.Cryptography.SafeHandles.
SafeLibraryHandle
LoadLibraryEx(string lpFileName, nint hFile, uint dwFlags)
194
global::Microsoft.AspNetCore.Cryptography.SafeHandles.
SafeLibraryHandle
__retVal = default;
197
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Cryptography.SafeHandles.
SafeLibraryHandle
>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
SafeHandles\SafeLibraryHandle.cs (6)
109
public static
SafeLibraryHandle
Open(string filename)
113
SafeLibraryHandle
handle = UnsafeNativeMethods.LoadLibraryEx(filename, IntPtr.Zero, LOAD_LIBRARY_SEARCH_SYSTEM32);
139
SafeLibraryHandle
lpSource,
171
SafeLibraryHandle
lpModuleName, // can point to a location within the module if GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS is set
182
SafeLibraryHandle
hModule,
188
internal static partial
SafeLibraryHandle
LoadLibraryEx(
UnsafeNativeMethods.cs (10)
21
private static
SafeLibraryHandle
? _lazyBCryptLibHandle;
24
private static
SafeLibraryHandle
? _lazyCrypt32LibHandle;
27
private static
SafeLibraryHandle
? _lazyNCryptLibHandle;
440
private static
SafeLibraryHandle
GetLibHandle(string libraryName, ref
SafeLibraryHandle
? safeLibraryHandle)
444
var
newHandle =
SafeLibraryHandle
.Open(libraryName);
455
private static
SafeLibraryHandle
GetBCryptLibHandle() => GetLibHandle(BCRYPT_LIB, ref _lazyBCryptLibHandle);
456
private static
SafeLibraryHandle
GetCrypt32LibHandle() => GetLibHandle(CRYPT32_LIB, ref _lazyCrypt32LibHandle);
457
private static
SafeLibraryHandle
GetNCryptLibHandle() => GetLibHandle(NCRYPT_LIB, ref _lazyNCryptLibHandle);