[DllImport("kernel32", SetLastError=true, CharSet = CharSet.Auto)]
static extern IntPtr LoadLibrary([MarshalAs(UnmanagedType.LPStr)]string lpFileName);
<DllImport("kernel32.dll", SetLastError:=True), CharSet:=CharSet.Auto> _
Public Shared Function LoadLibrary(ByVal lpFileName As String) As IntPtr
End Function
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpFileName As String) As IntPtr
None.
None.
Please add some!
private void LoadDll() {
hExe = LoadLibrary(mFileName);
if (hExe == IntPtr.Zero) {
throw new System.ComponentModel.Win32Exception("Cannot load " + mFileName);
}
// etc..
}
Do you know one? Please contribute it!