157 lines
9.4 KiB
HTML
157 lines
9.4 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2005" />
|
|
<meta name="DC.rights.owner" content="(C) Copyright IBM Corporation 2005" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="concept" />
|
|
<meta name="DC.Title" content="Setting up sample C++ plug-ins" />
|
|
<meta name="abstract" content="This task involves building and running the sample ActiveX server DLL." />
|
|
<meta name="description" content="This task involves building and running the sample ActiveX server DLL." />
|
|
<meta name="DC.Relation" scheme="URI" content="rzakxinstrunsmpleplug.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="http://www.ibm.com/servers/eserver/iseries/access/toolkit/opnav_plugins.htm" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rzakxinstrunsmpcplusplus" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Setting up sample C++ plug-ins</title>
|
|
</head>
|
|
<body id="rzakxinstrunsmpcplusplus"><a name="rzakxinstrunsmpcplusplus"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Setting up sample C++ plug-ins</h1>
|
|
<div><p>This task involves building and running the sample ActiveX server
|
|
DLL.</p>
|
|
<p>The sample provides a functioning Developer Studio workspace that you can
|
|
use to set breakpoints and to observe the behavior of a typical iSeries™ Navigator
|
|
plug-in. It also allows you to verify that your Developer Studio environment
|
|
is set up correctly for compiling and linking plug-in code.</p>
|
|
<p>In order to get the sample C++ plug-in running or your PC, you must complete
|
|
the following steps:</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><tbody><tr><td valign="top" width="12.5%">Download the C++ plug-in</td>
|
|
<td valign="top" width="87.5%">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. </td>
|
|
</tr>
|
|
<tr><td valign="top" width="12.5%">Prepare to build an ActiveX server .dll</td>
|
|
<td valign="top" width="87.5%"> <ol><li>Create a new directory that is named "MyProject" on your local hard drive.
|
|
This example assumes that the local drive is the C: drive. <div class="note"><span class="notetitle">Note:</span> If the new
|
|
directory is not c:\MyProject, you will need to change the registry file.</div>
|
|
</li>
|
|
<li>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.</li>
|
|
<li>In the Developer Studio, open the <span class="uicontrol">File</span> menu and
|
|
select <span class="uicontrol">Open Workspace</span>.</li>
|
|
<li>In the Open Project Workspace dialog, switch to the <span class="uicontrol">MyProject</span> directory
|
|
and in <span class="uicontrol">Files of Type:</span> select <span class="uicontrol">Makefiles (*.mak)</span>.</li>
|
|
<li>Select <span class="uicontrol">sampext.mak</span> and click <span class="uicontrol">Open</span>.</li>
|
|
<li>Open the <span class="uicontrol">Tools</span> menu and select <span class="uicontrol">Options...</span></li>
|
|
<li>In the <span class="uicontrol">Directories</span> tab, make sure that the Client
|
|
Access Include directory appears at the top of your Include files search path.</li>
|
|
<li>In <span class="uicontrol">Show directories for:</span>, select <span class="uicontrol">Library
|
|
files</span>. Make sure that the Client Access Lib directory appears
|
|
at the top of your Library files search path.</li>
|
|
<li>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.</li>
|
|
</ol>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="12.5%">Build the ActiveX server DLL</td>
|
|
<td valign="top" width="87.5%"> <ol><li>In the Developer Studio, open the <span class="uicontrol">Build</span> menu and
|
|
select <span class="uicontrol">Set Default Configuration...</span></li>
|
|
<li>In the Default Project Configuration dialog, select samptext <span class="uicontrol">Win32
|
|
Debug Configuration</span>.</li>
|
|
<li>Open the <span class="uicontrol">Build</span> menu and select <span class="uicontrol">Rebuild
|
|
All</span> to compile and link the DLL. <div class="note"><span class="notetitle">Note:</span> 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 <span class="uicontrol">Build</span> menu and select
|
|
<span class="uicontrol">sampext.dll</span> to restart the build.</div>
|
|
</li>
|
|
</ol>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="12.5%">Build the resource library</td>
|
|
<td valign="top" width="87.5%"> <p>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.</p>
|
|
<p>To build the
|
|
resource DLL, complete the following steps:</p>
|
|
<ol><li>In Developer Studio, open the <span class="uicontrol">File</span> menu and select <span class="uicontrol">Open
|
|
Workspace...</span> and select the <span class="uicontrol">MyProject</span> directory.</li>
|
|
<li>Specify <span class="uicontrol">Makefiles (*.mak)</span> in <span class="uicontrol">Files of
|
|
Type:</span>.</li>
|
|
<li>Select <span class="uicontrol">sampmri.mak</span> and click <span class="uicontrol">Open</span>.</li>
|
|
<li>Open the <span class="uicontrol">Build</span> menu and select <span class="uicontrol">Rebuild
|
|
All</span> to compile and link the DLL.</li>
|
|
</ol>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="12.5%">Register the ActiveX server .dll</td>
|
|
<td valign="top" width="87.5%"> <p>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.</p>
|
|
<ol><li>Open the SAMPDBG.REG file in the Developer Studio (or use your chosen
|
|
text editor).</li>
|
|
<li>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.</li>
|
|
<li>Save the file.</li>
|
|
<li>In Windows<sup>®</sup> Explorer, double-click the SAMPDBG.REG file.
|
|
This will write the entries in the registry file to the Windows registry
|
|
on your machine.</li>
|
|
</ol>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="12.5%">Run iSeries Navigator
|
|
in the debugger</td>
|
|
<td valign="top" width="87.5%"> <p>To run iSeries Navigator and observe the sample plug-in
|
|
in action, complete the following steps.</p>
|
|
<ol><li>In Developer Studio, open the <span class="uicontrol">Build</span> menu and select <span class="menucascade"><span class="uicontrol">Debug</span> > <span class="uicontrol"> Go</span></span>.</li>
|
|
<li>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.</li>
|
|
<li>Click <span class="uicontrol">OK</span>. The main window of the iSeries Navigator
|
|
will open.</li>
|
|
<li>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.</li>
|
|
<li>After the progress indicator finishes, click <span class="uicontrol">OK</span> in
|
|
the resulting dialog.</li>
|
|
<li>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.</li>
|
|
</ol>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakxinstrunsmpleplug.htm" title="The Programmer's Toolkit supplies sample plug-ins in each of the supported programming languages.">Install and run sample plug-ins</a></div>
|
|
</div>
|
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
|
<div><a href="http://www.ibm.com/servers/eserver/iseries/access/toolkit/opnav_plugins.htm" target="_blank">Programmer's Toolkit - iSeriesNavigator Plug-ins Web page</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |