Customize the VB plug-in registry values

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.

The following table describes the sections in this registry file, and recommends changes for use when developing your own plug-in.

Primary registry key

The primary registry key defines a set of fields which specify global information for the plug-in. This information is required.

Note: The subkey name must match the ProgID for your plug-in.

See Example Primary registry key for a description of each field.

[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"

Recomended changes:

  1. Change the name "vbsample.dll" in the ServerEntryPoint key to match the name of the plug-in ActiveX server DLL.
  2. 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.
Note: Do not include the path in either of these changes.

Registering a new folder

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.

The Visual Basic ListManager class is the main interface to serve data to your plug-in folder.

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.

See Example: New folder registry key for a description of each field, and the possible values.

[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

Recomended changes:

  1. 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: listman.cls and actnman.cls.
  2. 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.
  3. Change the value of the "VBInterface" key to the ListManager implementation class interface ID.

Registering VB plug-in objects

The final section of the registry specifies which objects in the Navigator hierarchy are affected by implementation of the Visual Basic plug-in.

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® registry.

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.

;--------------------------------------------------------------------
; 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}"

Recommended changes:

  1. The CLSID in the entries above should always have the following: "{040606B2-1C19-11d2-AA12-08005AD17735}"
  2. The "VBClass" key contains the program identifier (ProgID) of the Visual Basic implementation class.
  3. The "VBInterface" key contains the Visual Basic implementation class' interface ID.
  4. 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.
  5. 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.
  6. 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.

Global changes:

Define a unique programmatic identifier, or ProgID for your plug-in. The ProgID should match the <vendor>.<component> 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®.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.

Replace all instances of "IBM.VBSample" with your new [vender].ProgID.

Note: 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.

See Example: Primary registry key.

Related concepts
Example: Primary registry key