Forum Discussion

jrussell2's avatar
jrussell2
New Contributor
10 years ago

Test Execute does not load 32-bit DLL?

Using TestComplete/Test Execute 9, on aWindows 7 64-bit OS. I'm calling an external DLL that is 32-bit.

 

I followed the steps to define the environment:

 

Def_Environment := DLL.DefineEnvironment(true);

DLLDef := Def_Environment.DefineDLL(DLL_PATH);

 

Then, further down after a bunch of DLLDef.DefineProcs I have

G_DLLVar := Def_Environment.Load(DLL_PATH);

 

When I run the script with TestComplete, it loads the dll and executes fine. However, when I call TestExecute (shelling it out from another program or the command line), it fails on one of the DefineProc methods with an "unknown name" error. This method is hit successfully when running via TestComplete.

 

Is there some additional parameter I need to pass in the command line for TestExecute, some configuration for TestExecute I'm missing?

 

Thank you for the assistance.

4 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Justin,

     

    Do you use the same version of TestComplete and TestExecute?

    • jrussell2's avatar
      jrussell2
      New Contributor

      Tanya,

       

      Yes, or at least very close. I have Test Complete 9, version 9.20.2460.7 and TestExecute 9 version 9.20.2460.11

  • colinstrydom's avatar
    colinstrydom
    Occasional Contributor

    I build my own dlls and use some windows dlls in my projects and but I don't use it the same way as you.

     

    I add my dll's to the CLR Bridg of my project and then just call them from script. When adding custom dlls, you just need to ensure they are on the target machine, and you can use relateive paths as well.

     

    I then perform the call in C# script as follows

     

    dotNET["FileCompare"]["LineComparison"]["zctor"]["comparefile"](lreferencefilePath,lreferenceFileName,linputFilePath,linputFileName,loutputFilePath,loutputFileName,ldeleteOldLogs)

     

    This works on the latest test exectute, I cannot confirm on version 9

    • mes6073's avatar
      mes6073
      Contributor

      We also use the CLR Bridge to access DLLs, first in v9.0 and currently 10.6 of both TestComplete and TestExecuteand. I will say that we did have issues with older C++ DLLs, but our newer, custom DLLs based on .NET 3.5, 4.0, and 4.5 frameworks worked fine with the CLR Bridge in a distributed test model, but I recently also ran that with just TestExecute hacnling both master and slave roles .