Ask a Question

Call function of DLL at testcomplete


Call function of DLL at testcomplete

Hi Buddy ,

i failed to call function of DLL which is developed in C++

the function of DLL in C++ as below

#include "stdafx.h"
 int add(int a, int b)
  return a + b;



my script at testcomplete is as below

sub test
dim a
set Def_Dll=DLL.DefineDLL("test_dll")

Call Def_DLL.DefineProc("addA",vt_i4,vt_i4,vt_i4)
Call Def_DLL.DefineAlias("add", "addA")
set Lib=Dll.Load("C:\Users\H208139\Desktop\test_dll\Debug\test_dll.dll","test_dll")


end sub


test result :Object doesn't support this property or method: 'Lib.add'


 I attached the modified dll

SmartBear Alumni (Retired)

Community, are there more ideas?

Tanya Yatskovskaya
SmartBear Community and Education Manager

>  I attached the modified dll

Hm-m-m... I don't see attached dll (and sources)...

Can you double check please?


  /Alex [Community Champion]
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
Showing results for 
Search instead for 
Did you mean: