Forum Discussion

mfoster711's avatar
mfoster711
Regular Contributor
13 years ago

Error trying to use DLL

I am getting the following error when trying to use a custom DLL function from TC. Error:



An exception occurred in the "Unit1" unit at line 78:

An exception occurred: 0xC0000005; class: ; description: ''



Here is the code I am trying to execute. The error occurs on the last line:



Set DefDLL = DLL.DefineDLL("MyDLL")

Call DefDLL.DefineProc("MyDLLOpenConnection", VT_I4, VT_I4)

Set Lib = DLL.Load("c:\MyApp\system\MyDLL.dll", "MyDLL")

Log.Message "CurrHwnd:" & CurrWindHwnd

Call Lib.MyDLLOpenConnection(CurrWindHwnd)



I have been using this custom DLL from Rational Robot for years. Here is how I define the function from withint Robot:



Declare Function MyDLLOpenConnection Lib "c:\MyApp\system\MyDLL.dll" (ByVal hWnd as Long) as Long

1 Reply


  • Hello Mark,





    This problem was found in TestComplete 8.60, and a patch was created. At that, the problem is also resolved in the latest version of TestComplete - v.8.70.

    Try upgrading to 8.70 - this should resolve the problem.