Forum Discussion
yes , I tried suggestions given here, error message is still object doesn't support this property or method: 'Lib.add'
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.
- nikki856 years agoContributor
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 subAnd I attached the modified dll
- nikki856 years agoContributor
I attached the modified dll
- TanyaYatskovska6 years agoSmartBear Alumni (Retired)
Community, are there more ideas?
Related Content
Recent Discussions
- 21 hours agoGane195