1.
问题:
我们通常去映射dll的方法是使用
[DllImport(dllPath + " test.dll " , EntryPoint = " test() " , SetLastError = true ,
CharSet = CharSet.Ansi, ExactSpelling = true , CallingConvention = CallingConvention.Cdecl)]
public static extern int test();
解决方案:
[DllImport(
"
Kernel32.dll
"
)]
public
static
extern
IntPtr LoadLibrary(
string
lpFileName);
[DllImport(
"
kernel32.dll
"
, SetLastError
=
true
)]
public
static
extern
int
GetProcAddress(
IntPtr hModule,
string
lpProcName);
7万+



被折叠的 条评论
为什么被折叠?



