我是第一次使用VB,请各位多多指教。。在WINCE下,我写了一个MFC规则的静态DLL,想被VB的界面调用。
DLL里:
extern "C" __declspec(dllexport) void test(void);void test()
{
AfxMessageBox(_T("OK"));
}在VB下声明:
Public Declare Function test Lib "\CF\Debug\TEST.dll" () Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
test ()
End Sub运行出错,提示 未处理的“System.NotSupportedException”类型的异常出现在 TEST.exe 中。请教各位是什么问题啊????谢谢了。。
DLL里:
extern "C" __declspec(dllexport) void test(void);void test()
{
AfxMessageBox(_T("OK"));
}在VB下声明:
Public Declare Function test Lib "\CF\Debug\TEST.dll" () Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
test ()
End Sub运行出错,提示 未处理的“System.NotSupportedException”类型的异常出现在 TEST.exe 中。请教各位是什么问题啊????谢谢了。。
_test ()
End Sub
_test ()
End Sub
"出现了:未处理的“System.MissingMethodException”类型的异常出现在 TEST.exe 中。其他信息: Impossibile trovare un punto di ingresso '_InitHanZiTable' in una DLL PInvoke '\CF\Debug\HanZiStaticDllInCE.dll'.
void test()
{
AfxMessageBox(_T("OK"));
}改为
void test()
{
return;
}
未处理的“System.NotSupportedException”类型的异常出现在 TEST.exe 中。都会出错。
extern "C" __declspec(dllexport) void __stdcall test(void)
{
AfxMessageBox(_T("OK"));
}Declare Auto Function _test@0 Lib "\CF\Debug\TEST.dll" ()
你应该用link.exe /dump /exports查看dll中的导出符号是什么