Overview | Documentation | C# | VB.NET | VB6 | C/C++ | Download
You application calls OCX Installer during application initialization, usually in WinMain or CWinApp::InitInstance:
if (!OCXInstaller_ProcessFile(TRUE, "TestApp_CPP", "Softel vdm, Inc.", ".\\SftTree_IX86_U_60.ocx", "%WinSys", TRUE, FALSE))
return FALSE;
In the source file containing WinMain or CWinApp::InitInstance, add the following #include statement:
#include "OCXInstaller.h"
Your project settings must be modified to search the directory containing the above header file:
VC6: Project, Settings menu command, click on the C/C++ tab, select Preprocessor in the Category combo box, then add the include directory to the Additional include directories text box. The usual path is \Program Files\Softelvdm\OCX Installer\Include.
VS 2003, 2005, 2008: Project, Properties menu command, click on the C/C++, General category (in Configuration Properties), then add the include directory to the Additional Include Directories text box. The usual path is \Program Files\Softelvdm\OCX Installer\Include.
Make sure to update Debug and Release settings.
The application must be linked with OCXInstaller.lib, which is located at \Program Files\Softelvdm\OCX Installer\Dll:
VC6: Project, Add To Project menu command, select Files.... Locate \Program Files\Softelvdm\OCX Installer\Dll\OCXInstaller.lib and add it.
VS 2003, 2005, 2008: Project, Add Existing Item... menu command, locate \Program Files\Softelvdm\OCX Installer\Dll\OCXInstaller.lib and add it.
Make sure to update Debug and Release settings.
In order to debug/execute your application, make sure to copy the OCXInstaller.Dll and all other required files (OCXes) to the folder containing your executable.
Also, your debugger settings need to updated to set the working directory to the directory where your application executable is located.
VC6: Project, Settings menu command, click on the Debug tab, select General in the Category combo box and update the Working directory.
VS 2003, 2005, 2008: Project, Properties menu command, click on the Debugging category (in Configuration Properties) and update the Working Directory.
Make sure to update Debug and Release settings.
|