18 references to SafeLibraryHandle
Microsoft.AspNetCore.Cryptography.Internal (18)
Cng\OSVersionUtil.cs (2)
24using var bcryptLibHandle = SafeLibraryHandle.Open(UnsafeNativeMethods.BCRYPT_LIB);
SafeHandles\SafeLibraryHandle.cs (6)
109public static SafeLibraryHandle Open(string filename) 113SafeLibraryHandle handle = UnsafeNativeMethods.LoadLibraryEx(filename, IntPtr.Zero, LOAD_LIBRARY_SEARCH_SYSTEM32); 139SafeLibraryHandle lpSource, 171SafeLibraryHandle lpModuleName, // can point to a location within the module if GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS is set 182SafeLibraryHandle hModule, 191internal static extern SafeLibraryHandle LoadLibraryEx(
UnsafeNativeMethods.cs (10)
21private static SafeLibraryHandle? _lazyBCryptLibHandle; 24private static SafeLibraryHandle? _lazyCrypt32LibHandle; 27private static SafeLibraryHandle? _lazyNCryptLibHandle; 440private static SafeLibraryHandle GetLibHandle(string libraryName, ref SafeLibraryHandle? safeLibraryHandle) 444var newHandle = SafeLibraryHandle.Open(libraryName); 455private static SafeLibraryHandle GetBCryptLibHandle() => GetLibHandle(BCRYPT_LIB, ref _lazyBCryptLibHandle); 456private static SafeLibraryHandle GetCrypt32LibHandle() => GetLibHandle(CRYPT32_LIB, ref _lazyCrypt32LibHandle); 457private static SafeLibraryHandle GetNCryptLibHandle() => GetLibHandle(NCRYPT_LIB, ref _lazyNCryptLibHandle);