Download the C++ plug-in |
Download the executable file cppsmppq.exe. When you run the file it
will extract all the files associated with the plug-in. Make a new directory,
c:\MyProject, and copy all the files into it. If you create a different directory,
you will have to modify registry file to specify the correct location for
the plug-in. |
Prepare to build an ActiveX server .dll |
- Create a new directory that is named "MyProject" on your local hard drive.
This example assumes that the local drive is the C: drive.
Note: If the new
directory is not c:\MyProject, you will need to change the registry file.
- Copy all of the sample files into this directory. You can download the
samples from the Programmer's Toolkit - iSeries Navigator Plug-ins Web page.
- In the Developer Studio, open the File menu and
select Open Workspace.
- In the Open Project Workspace dialog, switch to the MyProject directory
and in Files of Type: select Makefiles (*.mak).
- Select sampext.mak and click Open.
- Open the Tools menu and select Options...
- In the Directories tab, make sure that the Client
Access Include directory appears at the top of your Include files search path.
- In Show directories for:, select Library
files. Make sure that the Client Access Lib directory appears
at the top of your Library files search path.
- Click OK to save the changes, then close and reopen Developer Studio.
This is the only known way to force Developer Studio to save the search path
changes to your hard disk.
|
Build the ActiveX server DLL |
- In the Developer Studio, open the Build menu and
select Set Default Configuration...
- In the Default Project Configuration dialog, select samptext Win32
Debug Configuration.
- Open the Build menu and select Rebuild
All to compile and link the DLL.
Note: If the DLL does not compile
and link cleanly, double-click the error messages in the Build window to locate
and fix the errors. Then open the Build menu and select
sampext.dll to restart the build.
|
Build the resource library |
The resource DLL that contains the translatable text strings and
other locale-dependent resources for the plug-in is included with the sample.
This means that you do not have to create this DLL on your own. Even if your
plug-in supports only one language, your plug-in code must load its text strings
and locale-specific resources from this resource library.
To build the
resource DLL, complete the following steps:
- In Developer Studio, open the File menu and select Open
Workspace... and select the MyProject directory.
- Specify Makefiles (*.mak) in Files of
Type:.
- Select sampmri.mak and click Open.
- Open the Build menu and select Rebuild
All to compile and link the DLL.
|
Register the ActiveX server .dll |
The SAMPDBG.REG file in the MyProject directory contains registry
keys that communicate the location of the sample plug-in on your workstation
to the iSeries Navigator.
If you specified a directory other than c:\MyProject, complete the following
steps.
- Open the SAMPDBG.REG file in the Developer Studio (or use your chosen
text editor).
- Replace all occurrences of "c:\\MyProject\\" with "x:\\<dir>\\,"
where x is the drive letter where your directory resides and <dir> is
the name of the directory.
- Save the file.
- In Windows® Explorer, double-click the SAMPDBG.REG file.
This will write the entries in the registry file to the Windows registry
on your machine.
|
Run iSeries Navigator
in the debugger |
To run iSeries Navigator and observe the sample plug-in
in action, complete the following steps.
- In Developer Studio, open the Build menu and select .
- At the prompt, type the fully-qualified path to the iSeries Navigator
executable in the iSeries Access for Windows Install directory on your workstation.
The path will be C:\PROGRAM FILES\IBM\CLIENT ACCESS\CWBUNNAV.EXE or something
similar.
- Click OK. The main window of the iSeries Navigator
will open.
- Because you have just registered a new Navigator plug-in, a dialog in iSeries Navigator
will prompt you to scan for the new plug-in.
- After the progress indicator finishes, click OK in
the resulting dialog.
- After the Navigator window refreshes, a new folder (3rd Party Sample Folder)
appears in the hierarchy under the iSeries server that was initially selected.
You can now interact with the plug-in in iSeries Navigator and observe its behavior
in the debugger.
|