Debugging ActiveX Servers in LabWindows/CVI
ActiveX servers are like other executables and DLLs. You can debug the ActiveX servers in the usual manner in LabWindows/CVI. If you need to debug the ActiveX server, you must build it in debug configuration.
If the server is an executable, it runs in a separate process and not in the client process. For this reason, executable servers also are called out-of-process servers.
When an ActiveX client connects to a DLL server, the server is loaded in the client process. For this reason, DLL servers also are referred to as in-process servers. To debug a DLL server, build the DLL in debug configuration, add breakpoints, and run the ActiveX client executable from within LabWindows/CVI by using the Run»Specify Executable and Command Line item.
At times, you might need to debug both the ActiveX client and server code. For EXE servers, follow the preceding recommendations to debug the server in one instance of LabWindows/CVI while you debug the ActiveX client separately in a different instance of the debugger. If the server is a DLL and the client is an executable built in LabWindows/CVI, load the client project in LabWindows/CVI, open the server source code from this instance of LabWindows/CVI, add breakpoints, and debug the client project. Now you can use this instance of LabWindows/CVI to debug the client source code and the server source code. Notice that for this method, the client must be an executable built in LabWindows/CVI. When none of the preceding techniques are possible, you can add DebugPrintf, printf, fprintf, MessagePopup, and other LabWindows/CVI function calls to the ActiveX server code to trace and debug the code. This method is useful when a bug occurs in the release configuration of the server but cannot be reproduced in the debug configuration.