ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakx_5.4.0.1/rzakxsmpvbreg.htm

199 lines
12 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="task" />
<meta name="DC.Title" content="Customize the VB plug-in registry values" />
<meta name="abstract" content="The sample plug-includes two registry files: VBSMPDBG.REG, a windows-readbale registry file for use during development and VBSMPRLS.REG, a registry file for distribution on the iSeries server." />
<meta name="description" content="The sample plug-includes two registry files: VBSMPDBG.REG, a windows-readbale registry file for use during development and VBSMPRLS.REG, a registry file for distribution on the iSeries server." />
<meta name="DC.Relation" scheme="URI" content="rzakxcreateplugin.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakxprntkeyvalues.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakxnewforegkeyex.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakxpriregkeyex.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzakxsmpvbreg" />
<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>Customize the VB plug-in registry values</title>
</head>
<body id="rzakxsmpvbreg"><a name="rzakxsmpvbreg"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Customize the VB plug-in registry values</h1>
<div><p>The sample plug-includes two registry files: VBSMPDBG.REG, a windows-readbale registry file for use during development and VBSMPRLS.REG, a registry file for distribution on the iSeries™ server.</p>
<div class="section"><p>The following table describes the sections in this registry file, and recommends changes for use when developing your own plug-in.</p>
<p><strong>Primary registry key</strong></p>
<p>The primary registry
key defines a set of fields which specify global information for the plug-in. This information is required.</p>
<div class="note"><span class="notetitle">Note:</span> The subkey name must match the ProgID for your plug-in.</div>
<p>See Example Primary
registry key for a description of each field.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><tbody><tr><td valign="top"> <pre>[HKEY_CLASSES_ROOT\IBM.AS400.Network
\3RD PARTY EXTENSIONS\IBM.VBSample]
"Type"="Plugin"
"NLS"="vbsmpmri.dll"
"NameID"=dword:00000080
"DescriptionID"=dword:00000081
"MinimumIMPIRelease"="NONE"
"MinimumRISCRelease"="040200"
"ProductID"="NONE"
"ServerEntryPoint"="vbsample.dll"</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>Recomended changes:</p>
</div>
<ol><li><span>Change the name "vbsample.dll" in the ServerEntryPoint key to match the name of the plug-in ActiveX server DLL.</span></li>
<li><span>Change the name "vbsmpmri.dll" in the NLS key to match the name of the C++ MRI resource DLL for your plug-in. Each Visual Basic plug-in must have a unique C++ MRI DLL name.</span></li>
</ol>
<div class="section"><div class="note"><span class="notetitle">Note:</span> Do not include the path in either of these changes.</div>
<p><strong>Registering a new folder</strong></p>
<p>This section will register a Visual Basic Plug-in ListManager class implementation for each
new folder added to the iSeries Navigator hierarchy. If your plug-in does not add any new folders to the iSeries Navigator hierarchy, delete this section and proceed to the next task.</p>
<p>The Visual Basic ListManager class is the main interface to
serve data to your plug-in folder.</p>
<p>The sample places the Sample Visual Basic Folder into the root level of an iSeries server
system name in the iSeries Navigator hierarchy. If you want your folder to appear at some other point in the hierarchy, you
must change the "Parent" key value. See Parent field values for a listing of possible values.</p>
<p>See Example: New folder registry key for a description of each field, and the possible values.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><tbody><tr><td valign="top"> <pre>[HKEY_CLASSES_ROOT\IBM.AS400.Network\
3RD PARTY EXTENSIONS\IBM.VBSample\
folders\SampleVBFolder]
"Parent"="AS4"
"Attributes"=hex:00,01,00,20
"CLSID"="{040606B1-1C19-11d2-AA12-08005AD17735}"
"VBClass"="vbsample.SampleListManager"
"VBInterface"="{0FC5EC72-8E00-11D2-AA9A-08005AD17735}"
"NameID"=dword:00000082
"DescriptionID"=dword:00000083
"DefaultIconIndex"=dword:00000001
"OpenIconIndex"=dword:00000001</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>Recomended changes:</p>
<ol><li>Change all occurrences of the name "SampleVBFolder" in the registry file to a unique name that will identify your folder object. The name that is specified in the registry file must match the object
name that is specified in your ListManager and ActionsManager Visual Basic classes. For the sample plug-in these Visual Basic source files are: <span class="uicontrol">listman.cls</span> and <span class="uicontrol">actnman.cls</span>.</li>
<li>Change the name "vbsample.SampleListManager" in the VBClass key to match the program identifier name of your ListManager class. For example, if your ActiveX Server DLL is named foo.dll, and your ListManager
implementation class is MyListManager, then the program identifier is "foo.MyListManager". This name is case-sensitive.</li>
<li>Change the value of the "VBInterface" key to the ListManager implementation class interface ID.</li>
</ol>
<p><strong>Registering VB plug-in objects</strong></p>
<p>The final section of the registry specifies which objects in the Navigator hierarchy are affected by implementation of the Visual Basic plug-in.</p>
<p>On
many of the ActionsManager, ListManager and DropTargetManager class methods, you will be passed in items or objects. To determine which folder object is being referenced, use the object type string that
is defined in the Windows<sup>®</sup> registry.</p>
<p>Property sheets still can be added to your plug-in by using a context
menu item. You cannot use a registry key for a property sheet that is the mechanism that is used for a C++ plug-in. Property sheet handlers including the Auto Refresh property sheet handler are not supported
for Visual Basic plug-ins.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><tbody><tr><td valign="top"> <pre>;--------------------------------------------------------------------
; Register a context menu handler for the new folder and its objects
[HKEY_CLASSES_ROOT\IBM.AS400.Network\3RD PARTY EXTENSIONS\
IBM.VBSample\shellex\SampleVBFolder\*\
ContextMenuHandlers\{040606B2-1C19-11d2-AA12-08005AD17735}]
"VBClass"="vbsample.SampleActionsManager"
"VBInterface"="{0FC5EC7A-8E00-11D2-AA9A-08005AD17735}"
;---------------------------------------------------------------------
; Register drag and drop context menu handlers
[HKEY_CLASSES_ROOT\IBM.AS400.Network\3RD PARTY EXTENSIONS\
IBM.VBSample\shellex\SampleVBFolder\*\
DragDropHandlers\{040606B2-1C19-11d2-AA12-08005AD17735}]
"VBClass"="vbsample.SampleActionsManager"
"VBInterface"="{0FC5EC7A-8E00-11D2-AA9A-08005AD17735}"
;----------------------------------------------------------------------
; Register Drop Handler to accept drops of objects
[HKEY_CLASSES_ROOT\IBM.AS400.Network\3RD PARTY EXTENSIONS\IBM.VBSample\
shellex\SampleVBFolder\*\
DropHandler]
@="{040606B2-1C19-11d2-AA12-08005AD17735}"
"VBClass"="vbsample.SampleDropTargetManager"
"VBInterface"="{0FC5EC6E-8E00-11D2-AA9A-08005AD17735}"</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>Recommended changes:</p>
<ol><li>The CLSID in the entries above should always have the following: "{040606B2-1C19-11d2-AA12-08005AD17735}"</li>
<li>The "VBClass" key contains the program identifier (ProgID) of the Visual Basic implementation class.</li>
<li>The "VBInterface" key contains the Visual Basic implementation class' interface ID.</li>
<li>If your plug-in will not be a drop handler for objects, remove the drag and drop context menu handler and drop handler registry entries.</li>
<li>Rename the subkeys \SampleVBFolder\*\ and use a unique string to identify your folder object. This name is the object type that will be used in your Visual Basic source to identify when actions are
taken on this folder in iSeries Navigator.</li>
<li>In the file that you created that was based on the ActionsManager interface, edit the code that checks for the object types that are defined by the sample to reflect the name of your new folder object.
The sample's ActionsManager interface is located in actnman.cls.</li>
</ol>
<p><strong>Global changes:</strong></p>
<p>Define a unique programmatic identifier, or ProgID for your plug-in. The ProgID should match the &lt;vendor&gt;.&lt;component&gt; text string, where vendor identifies
the name of the vendor who developed the plug-in, and component describes the function being provided. In the sample plug-in, the string "IBM<sup>®</sup>.Sample"
identifies IBM as the vendor, and "Sample" as the description of the function that is provided by the plug-in. This will be
used throughout the registry file, and will name the directory where your plug-in will reside on both the iSeries server
and the workstation.</p>
<p>Replace all instances of "IBM.VBSample" with your new [vender].ProgID.</p>
<div class="note"><span class="notetitle">Note:</span> iSeries Navigator provides built-in ActiveX server DLLs that manage plug-ins written in Java™ and in Visual Basic. Therefore, all Java and Visual Basic plug-ins register their own
respective CLSID. The registry files that are provided with the programming samples already contain these predefined CLSIDs.</div>
<p>See Example: Primary registry key.</p>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rzakxprntkeyvalues.htm">Parent field values</a></strong><br />
List of ID codes for the parent folders</li>
<li class="ulchildlink"><strong><a href="rzakxnewforegkeyex.htm">Example: New folder registry key</a></strong><br />
A separate registry key must be defined for the root of each sub tree of objects that a plug-in chooses to add to the object hierarchy. This key contains information specific to the root folder of the sub tree.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakxcreateplugin.htm" title="After modifying the sample plug-ins, you'll need to make some modifications to the registry files. This topic provides a walk-through of the registry files for each type of plug-in, and recommends some modifications.">Customize the plug-in registry files</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rzakxpriregkeyex.htm" title="The primary registry key defines a set of fields that specify global information for the plug-in. This information is required.">Example: Primary registry key</a></div>
</div>
</div>
</body>
</html>