LabWindows™/CVI™ ActiveX Server Returns "Invalid Class String" on Deployment

Updated Jul 25, 2018

Reported In

Software

  • LabWindows/CVI 2012 SP1 Full

Issue Details

I am trying to deploy an ActiveX server on my machine using my LabWindows/CVI Applicaiton. When I try to deploy this server, I get an error returned with an "Invalid Class String" description and error code -2147221005. Why do I see this error and how should I correct it?

Solution

This error may be caused by the server not being correctly registered with Windows upon installation. Whether or not your server is registered in Windows can be determined by checking the registry keys in:

RegEdit.exe
HKEY_CLASSES_ROOT 
<Server_name>.<Object_name>


If this entry doesn't exist on your deployment computer, incorrect server registration may be the issue. See Building, Registering, and Distributing ActiveX Servers for more information. In this document, it is recommended that you manually register your application using RegSvr32.exe. Take a look at Microsoft's How to use the Regsvr32 tool and troubleshoot Regsvr32 error messages documentation for details on using RegSvr32 to manually register an .exe / .DLL.

Finally, a more scalable solution comes in the form of creating an installer for your server; the installer built when you create a distribution automatically registers and unregisters the DLL or EXE during installation and uninstallation, respectively.
 

WAS THIS ARTICLE HELPFUL?

Not Helpful