NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Why I cannot choose the exe file in the Automation Server field in the SpecifyModule window ( "Error loading type library/DLL " error code -18351 ) , *.tlb only .

I believe the more complete error message for error code -18351 is:
"Error loading type library/DLL.
Error Code: -18351, An error occurred reading an ActiveX Automation server type library."
This error usually occurs when you do not create a proper type library for you ActiveX server. As a test, try choosing \Examples\Demo\Vb\Computer\Computer.exe in the Automation Server field of the Edit Automation Call dialog box. I am confident that this example has a proper type library.
You can also try manually registering your ActiveX EXE server. To do this enter your server path followed by the command line "/regserver" (e.g. "c:\my directory\foo.exe" /regserver). Unfortunately this registration process sometimes fails silently since your program ignores the command li
ne argument. If it fails, you program will probably start running as if you entered the program path without the command line argument (e.g. "c:\my directory\foo.exe").
If successful, your program will NOT launch. It simply registers itself and quits. Unfortunately, not launching doesn't mean your program registered successfully, but it�s a good start.
If you successfully register you program you should find its program ID in the Automation Server ring control of the Edit Automation Call dialog box. You should not need to browse to the exe. After registering your server you may have to click the Reload button on the Edit Automation Call dialog box, before your program ID is available in the Automation Server ring control.
There is a knowledgebase article on www.ni.com about creating type libraries in Visual C++. It is not automatically created. Visual Basic does this automatically. Creating type libraries is specific to your application development environment.
Hope this help
s.
0 Kudos
Message 2 of 2
(3,120 Views)