小弟想用VB呼叫 VC++作出的DLL,於是用VC++4.0 Class wizard選Regular
DLLs產生一dll,裡面有一函式如下:
extern "C" _declspec(dllexport) double SumOf(double x,double y)
{
return (x+y);
}
而VB宣告如下:
Declare Function SumOf Lib "test" (ByVal x As Double, ByVal y As Double) As
Double
(ps:test.dll 放在\windows\system)
但執行卻出現error訊息,如下:bad DLL calling convention.
煩請各位指教
--
--
jin...@tpts5.seed.net.tw