Adding the Class IDs to the Sample

The MyTestType example does not provide information about the class ID or the necessary remote agent ID. Follow the example below to add the missing information..

The instructions on this page include examples of IDs. Do not use the ID strings from the example. Use the strings you copy from the registry on your development machine, as explained below.

To add the class and remote agent IDs:

  1. Register both the MyRunAgent and MyScriptViewer examples with the Windows operating system.
  2. Get the registered class CLSIDs. From the Start menu, choose Run, and run Regedit. In the Registry Editor, choose Edit > Find, and search for MyScriptViewer. Find the class under the HKEY_CLASSES_ROOT\CLSID\{XXXXXXXX-XXXX...} key, with the default string: MyScriptViewer.UserControl. The class ID string is the {XXXXXXXX-XXXX...} part (with hexadecimal numbers instead of the Xs). It is the folder name in the left pane near the open folder icon.
  3. Copy the class ID string into a text file for later use. Look at the Version sub-key and copy the version.
  4. Repeat the above steps for MyRunAgent and MyTestType.
  5. Open the MyTestType project with Visual Basic. Go to the Class_Initialize sub-routine, and type the MyScriptViewer and MyRunAgent class ID strings from above at the appropriate assignments of the RemoteAgentCLSID and ScriptViewerCLSID variables.
  6. Copy the Class ID string for MyScriptViewer to the MyTestType project, setting the variable "ScriptViewerCLSID". Replace "[Class ID for ActiveX script viewer]" with the class ID from the registry. For example:
    ScriptViewerCLSID = "{CEC307CF-09A8-4E9B-B2D0-E4BBFAD1D93C}"
  7. Copy the Class ID string for MyRunAgent to the MyTestType project, setting the variable RemoteAgentCLSID. Replace "[Class ID for the Run Remote Agent]" with the class ID from the registry. For example:
    RemoteAgentCLSID = "{19260D4B-EC7D-4868-9DCD-8B7FC64A370A}"
  8. Recompile the MyTestType project by choosing File > Make MyTestType.exe from the menu bar. Save the project.
  9. Note the new version number for MyTestType in the registry. Enter it in the text file where you are keeping the IDs and versions for later use. See "version" in "Parameters of the ini File".

Next: Install the test type, then Testing with the Example


© 1993 - 2013 Hewlett-Packard Development Company, L.P.