How Do I Register Type Libraries, ActiveX Controls, and ActiveX Servers?
Primary Software: Measurement Studio>>Measurement Studio for Visual Basic 6
Primary Software Version: 3.0.1
Primary Software Fixed Version: N/A
Secondary Software: N/A
How do I manually register type libraries (.TLB), ActiveX controls (.OCX), and ActiveX servers (.DLL and .EXE)?
Type libraries are binary files that contain all of the type information needed to utilize the procedures and classes in a .DLL. To register a type library, you should use regtlib.exe as follows:
ActiveX controls are files with a .OCX extension. These controls come in 16-bit and 32-bit forms, with 32-bit being the most common. To register an ActiveX control, you should use regsvr32.exe as follows:
Note: If you have a 16-bit control, you should run regsvr instead of regsvr32. If your ActiveX control is registered incorrectly, you must first unregister it and then register it again.
You will get a dialog box prompting you that your control has been unregistered or registered successfully. To unregister a control, use the switch /u (regsvr32 /u "<Full path of .OCX file>").
ActiveX servers can be in the form of dynamic link libraries (.DLLs) and executables (.EXEs). DLLs are registered like an ActiveX control with regsvr32 as in the previous section. However, when registering an .EXE, you must use call the .EXE file with the switch /RegServer as follows:
To unregister an EXE ActiveX Server use the switch /UnRegServer (C:\TestStand\Bin\REngine.exe /UnRegServer).
Note: If you find that you are dealing extensively with type libraries, ActiveX controls, and ActiveX servers, you may find the utility linked below useful. It is a very simple utility that allows you to quickly register and unregister type libraries, ActiveX controls, and ActiveX servers. The application is distributed freely by the Common Controls Replacement Project (CCRP), and the readme file included with the application explains how to use it.
Common Controls Replacement Project
KnowledgeBase 2XDAB1SJ. Why Does regsvr32.exe Register my .ocx File From the Incorrect Directory?
KnowledgeBase 417EP44G: How Do I Use an OCX File in LabVIEW?
Report Date: 01/12/1999
Last Updated: 12/27/2011
Document ID: 1HBAMMSR