Building, Registering, and Distributing ActiveX Servers
- Updated2023-02-21
- 2 minute(s) read
Building, Registering, and Distributing ActiveX Servers
After you implement the feature functions that are prototyped in the generated include file, you can build the ActiveX server in the same way you build an EXE or a DLL project in LabWindows/CVI. When you build the server by invoking the Build»Build command, LabWindows/CVI compiles all the source files, links them to create the server, compiles the generated IDL file into a type library, and embeds the type library into the target.
For ActiveX clients to detect and use ActiveX servers, the servers must be registered on the machine. If you enable the Register ActiveX server after build option in the Target Settings dialog box, LabWindows/CVI registers the target server each time that it builds the target server. ActiveX registration involves adding a number of entries in various locations in the system registry. Well-written ActiveX servers register themselves when they are installed on a system and unregister themselves when they are uninstalled. This process is known as self-registration.
You can configure the installer to register an ActiveX server during installation by customizing the installation behavior settings for specific files in the Edit Installer Dialog box. Additionally, if the ActiveX server has an associated help file, you can add that file in the Files tab of the Edit Installer dialog box.
For an ActiveX server built using LabWindows/CVI, the code for self-registration is present in the target itself. The server can be manually registered and unregistered in the following ways:
![]() |
Note When you build ActiveX servers, the ActiveX servers are registered in your user profile. This registration is not visible to other users on your system. When you register these servers outside the LabWindows/CVI environment, they are always registered for all users; this option requires administrator privilege. |
- DLL servers
- Registration: regsvr32 <Full Path of Server>
- Unregistration: regsvr32 /u <Full Path of Server>
Note You can find the regsvr32 utility executable in the Windows system folder.
- EXE servers
- Registration: <Full Path of Server> /RegServer
- Unregistration: <Full Path of Server> /UnregServer