File tree 1 file changed +3
-2
lines changed
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Interop
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,8 @@ static SNINativeMethodWrapper()
61
61
IntPtr pDll = LoadLibrary ( localFolder + subfolder + SNI ) ;
62
62
if ( pDll == IntPtr . Zero )
63
63
{
64
- throw new System . ComponentModel . Win32Exception ( "Failed to load " + localFolder + subfolder + SNI ) ;
64
+ throw new System . ComponentModel . Win32Exception ( "Failed to load " + localFolder + subfolder + SNI ,
65
+ new System . ComponentModel . Win32Exception ( Marshal . GetLastWin32Error ( ) ) ) ;
65
66
}
66
67
}
67
68
@@ -389,7 +390,7 @@ internal struct SNI_Error
389
390
#endregion
390
391
391
392
#region DLL Imports
392
- [ DllImport ( "kernel32.dll" ) ]
393
+ [ DllImport ( "kernel32.dll" , SetLastError = true ) ]
393
394
public static extern IntPtr LoadLibrary ( string dllToLoad ) ;
394
395
395
396
[ DllImport ( "secur32.dll" , ExactSpelling = true , SetLastError = true ) ]
You can’t perform that action at this time.
0 commit comments