怎样在exe中向dll的函数传递参数?
如dll中有一函数
void __decelspec(dllExport) GetParams(int myParam)
{
GlobalParam = myParam;
}
在vc中这样调用:
typedef void (*func)(int);
func myfunc = (func)GetProcAddress(ThedllInstance,"GetParams");
myfunc(5);
可出现如此错误:
unHandled Exception in MyExe.exe,:ox0000cs
到底在dll中写这个函数时我该注意什么,在调用的时候是不是错误了?
期待关注我的问题,谢谢!