18 references to SafeLibraryHandle
Microsoft.AspNetCore.Cryptography.Internal (18)
Cng\OSVersionUtil.cs (2)
24
using
var
bcryptLibHandle =
SafeLibraryHandle
.Open(UnsafeNativeMethods.BCRYPT_LIB);
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,
191
internal static extern
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);