Forum Discussion
I don't see the stdcall
calling convention in your original dll as Alex mentioned:
AlexKaras wrote:
The DLL routine to be called must match the
stdcall
calling convention.
At the same time, this is one of the requirements.
I'm not familiar with C++ very well - I suppose you should declare the add routine something like this:
int __stdcall add(int a, int b) { return a + b; }
If you modified the dll, it's worth posting the new one, as well as the updated code.
Hi TanyaGorbunova,
Thanks for your reply
I add the __stdcall at dll ,but the error message is the same : Object doesn't support this property or method: 'Lib.AddA'
My scripts in VBscript as below :
sub test
dim a
Set Def_Environment = DLL.DefineEnvironment(True)
Set Def_DLL = Def_Environment.DefineDLL("test_dll")
set Lib=Def_Environment.Load("C:\Users\H208139\Desktop\test_dll\Debug\test_dll.dll","test_dll")
Call Def_DLL.DefineProc("AddA",vt_int,vt_int,vt_int)
a=Lib.AddA(2,2)
log.Message(a)
end sub
And I attached the modified dll
- TanyaYatskovska7 years ago
Alumni
Community, are there more ideas?