Document revision date: 15 July 2002
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

COM, Registry, and Events for OpenVMS Developer's Guide


Previous Contents Index


Chapter 6
COM for OpenVMS Utilities for Application Development and Deployment

This chapter describes how to configure your OpenVMS system (and, optionally, your Windows NT system) to develop and deploy COM applications. It describes the following COM for OpenVMS utilities:

This chapter also includes information about configuring OpenVMS and Windows NT systems to interoperate.

Before you begin

Before you configure COM for OpenVMS on your OpenVMS system, you must install and configure required components and install COM for OpenVMS. See Chapter 4 for information about these steps.

6.1 DCOM$SETUP Utility

DCOM$SETUP is a collection of tools to help a system manager configure the COM for OpenVMS system environment.

DCOM$SETUP Conventions and Requirements

6.2 Running DCOM$SETUP

To run DCOM$SETUP , enter @SYS$STARTUP:DCOM$SETUP at the OpenVMS system prompt.

The system displays the OpenVMS COM Tools menu.

Figure 6-1 DCOM$SETUP OpenVMS COM Tools Menu



--------------------------------------------------------- 
                         OpenVMS COM Tools 
 
           1) DCOMCNFG, COM Configuration Properties 
           2) GUIDGEN, Globally Unique Identifier Generator 
           3) Populate the Registry database for COM 
           4) Start the COM server 
           5) Stop the COM server 
           6) Register a COM application 
           7) Create the DCOM$GUEST account and directory 
           8) Configure the DCOM$RPCSS accounts 
 
           H) Help 
           E) Exit 
 
Please enter your choice: 
--------------------------------------------------------- 

To choose an option, enter the option number. The options are as follows:

6.2.1 Creating and Configuring DCOM$RPCSS Accounts

To display these functions, choose option 8 from the OpenVMS COM Tools menu. The system displays the following:


--------------------------------------------------------- 
Configure the COM for OpenVMS Service Control Manager (DCOM$RPCSS) accounts 
 
   1) Create the DCOM$RPCSS account in both the SYSUAF database and the 
      Advanced Server for OpenVMS SAM database. The password you specify 
      for the new DCOM$RPCSS user is stored in a protected file. 
 
   2) Update the DCOM$RPCSS user password in the COM for OpenVMS Service 
      Control Manager password file. 
 
   E) Exit 
 
Please enter your choice: 
--------------------------------------------------------- 

Enter one of the following:

6.2.2 Starting and Stopping the COM Server (DCOM$RPCSS Process)

COM for OpenVMS requires that the COM server process ( DCOM$RPCSS ) always be running. The DCOM$RPCSS process on OpenVMS provides the same functions for the COM run-time environment that the RPCSS process provides on Microsoft Windows NT, including the following:

To start DCOM$RPCSS , either use DCOM$SETUP option 4 ("Start") (see Section 6.2) or call the COM for OpenVMS startup procedure directly from SYS$STARTUP:DCOM$STARTUP . See Section 4.11 for information on starting COM for OpenVMS.

To stop DCOM$RPCSS on your system, either use the DCOM$SETUP option 5 ("Stop") (see Section 6.2) or call the COM for OpenVMS shutdown procedure directly from SYS$STARTUP:DCOM$SHUTDOWN . See Section 4.12 for information on shutting down COM for OpenVMS.

6.2.3 Registering an Application

The following example shows how to register the COM for OpenVMS "Simple" application included on the COM for OpenVMS kit. You can use the resulting Windows NT file to register the server on a Windows NT system as long as the application is available on your Windows NT system.

To build the "Simple" application on a Windows NT system, see and execute the instructions in the README-SIMPLE.TXT file in DCOM$EXAMPLES:[SIMPLE] .

Note

You must build and compile the application before you can register it. For complete details, see the step-by-step example in DCOM$EXAMPLES:[SIMPLE] included in the COM for OpenVMS kit.

Use the following procedure:

  1. From the DCOM$SETUP menu, enter 6 or REGISTER .
  2. Answer the questions as follows:

    Note

    The "Simple" application already has a CLSID.

    Example 6-1 Sample" Simple" Application Registration on OpenVMS

    Enter server type (1. In-Proc  2. Out-Proc): 2 [Return] 
    Enter Local Path (device:[directory]filename.ext): DKA0:[SMITH]SSERVER.EXE [Return] 
    Enter Application Name (<RETURN> to assign default): COM Simple Server [Return] 
    Does the server have a CLSid {GUID} (Yes/No) [N]: Y [Return] 
    Enter the CLSid (i.e. {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}: 
       {5e9ddec7-5767-11cf-beab-00aa006c3606} [Return] 
     
    Verify Application Information: 
     
             Application Name: COM SIMPLE SERVER 
             Local Path: DKA0:[SMITH]SSERVER.EXE 
             Application ID: {5E9DDEC7-5767-11CF-BEAB-00AA006C3606} 
     
    Is the information correct (Yes/No) [Y]: [Return] 
    Register application (Yes/No)? [Y]: [Return] 
     
    SETUP-I-NEWFILES, The following files have been created: 
     
          DKA0:[SMITH]SSERVER.REG_NT 
          DKA0:[SMITH]SSERVER.REG_VMS 
     
    SETUP-I-SRVIN, Server has been registered 
    Press RETURN to continue: [Return] 
    

To register the "Simple" application on a Windows NT system, use the following procedure:

  1. Copy all the files in the DCOM$EXAMPLES:[SIMPLE] directory to your Windows NT system.
  2. Rename SSERVER.REG_NT to SSERVER.REG .
  3. Edit the file to point to the local server path.
    For example, replace DEVICE:\SSERVER with C:\SSERVER .
  4. Run the Install.bat program to add the necessary keys to the Windows NT registry.

Example 6-2 shows the contents of SSERVER.REG_NT .

Example 6-2 Contents of SSERVER.REG_NT

REGEDIT 
HKEY_CLASSES_ROOT\CLSID\{5E9DDEC7-5767-11CF-BEAB-00AA006C3606}\ = DCOM server application SSERVER 
HKEY_CLASSES_ROOT\CLSID\{5E9DDEC7-5767-11CF-BEAB-00AA006C3606}\LaunchPermission = Y 
HKEY_CLASSES_ROOT\CLSID\{5E9DDEC7-5767-11CF-BEAB-00AA006C3606}\LocalServer32 = DEVICE:\SSERVER 

To reregister the "Simple" application on an OpenVMS system, enter the following command at the system prompt:


$ @SSERVER.REG_VMS

Example 6-3 shows the contents of the SSERVER.REG_VMS command procedure:

Example 6-3 Contents of SSERVER.REG_VMS

$ Set noon 
$ regcp :=  $regcp 
$ crekey := $regcp create key 
$ creval := $regcp create value 
$ modval := $regcp modify value 
$ lisval := $regcp list value 
$ crekey HKEY_CLASSES_ROOT\CLSID\{5E9DDEC7-5767-11CF-BEAB-00AA006C3606} 
$ creval HKEY_CLASSES_ROOT\CLSID\{5E9DDEC7-5767-11CF-BEAB-00AA006C3606} - 
              /data="DCOM server application SSERVER" /type=sz 
$ creval HKEY_CLASSES_ROOT\CLSID\{5E9DDEC7-5767-11CF-BEAB-00AA006C3606}/name="AppID" - 
              /data="{5E9DDEC7-5767-11CF-BEAB-00AA006C3606}" /type=sz 
$ crekey HKEY_CLASSES_ROOT\CLSID\{5E9DDEC7-5767-11CF-BEAB-00AA006C3606}\LaunchPermission 
$ creval HKEY_CLASSES_ROOT\CLSID\{5E9DDEC7-5767-11CF-BEAB-00AA006C3606}\LaunchPermission - 
              /data="Y" /type=sz 
$ crekey HKEY_CLASSES_ROOT\CLSID\{5E9DDEC7-5767-11CF-BEAB-00AA006C3606}\LocalServer32 
$ creval HKEY_CLASSES_ROOT\CLSID\{5E9DDEC7-5767-11CF-BEAB-00AA006C3606}\LocalServer32 - 
              /data="DKA0::[SMITH]SSERVER.EXE" /type=sz 
$ 

6.3 Running DCOM$CNFG

DCOM$CNFG is a utility to help COM developers configure and manage COM for OpenVMS applications on OpenVMS. Use the DCOM$CNFG utility to query information and manipulate properties of COM for OpenVMS applications.

To use the DCOM$CNFG utility, choose option 1 from the DCOM$SETUP menu.

Note

Before running the DCOM$CNFG utility, you must:
  • Have OpenVMS Registry Read access to read application properties, and Write access to modify application properties.
  • Ensure that the ACME server is running on the current system. The ACME server must be running to view and change application security properties. For more information, see Table 4-1.
  • Acquire Windows NT security credentials before you can change an application identity. For more information, see Section 8.2.

The system displays the DCOM$CNFG Main menu.

Figure 6-2 DCOM$CNFG Main Menu



--------------------------------------------------------- 
                DCOM$CNFG Main 
 
   1 - Applications List 
   2 - System-wide Default Properties 
   3 - System-wide Default Security 
 
   (E to Exit) 
   (H for Help) 
 
   Enter <CTRL-Z> or 'E' to return to the previous menu at any time 
 
   Please enter your choice: 
--------------------------------------------------------- 

The options are as follows:

6.3.1 The DCOM$CNFG Application List Submenu

To display this submenu, from the DCOM$CNFG Main menu, choose option 1.

The system displays the Applications List submenu.

Figure 6-3 Applications List Submenu



--------------------------------------------------------- 
                Applications List 
 
   Index    Name 
    1      Inside COM, Chapter 11 Example 
    2      application 2
    3      application 3
    .      ... 
    .      ... 
    .      ... 
 
  (E to Exit to previous menu) 
  (H for Help) 
 
  Please enter Index number to select an Application: 
--------------------------------------------------------- 

Enter a number to select an application. You can then view or configure its properties.

This option displays the Application Properties submenu.

Note

The system stores the Application Properties (Location, Security, and Identity) (see Figure 6-4) in a special key in the OpenVMS Registry that is associated with each application. You cannot change the Application Properties until you create this special key using the DCOM$CNFG utility. The DCOM$CNFG utility creates this special key when the utility discovers a newly registered application. In this case, the DCOM$CNFG user must have acquired Windows NT security credentials for an account that is a member of the Administrator group. Otherwise, the key will not be created. For more information about acquiring Windows NT credentials, see Section 8.2).

Use the following procedure to manage the Application Properties:

  1. Register the application.
  2. Do either of the following:
    • Acquire Windows NT security credentials for an account that is a member of the Administrator group and then run DCOM$CNFG.
    • Have a system administrator with the appropriate credentials run DCOM$CNFG.
  3. Run DCOM$CNFG from your own account to manage the properties.

Figure 6-4 Application Properties Submenu



------------------------------------------------------------------ 
               Application Properties 
 
   General Properties of this DCOM Application 
 
   Application name:  Inside COM, Chapter 11 Example 
   Application id:    {0C092C2C-882C-11CF-A6BB-0080C7B2D682} 
   Application type:  local server 
   Local path:        DISK1:[SMITH.DISPATCH_SAMPLE1]CMPNT.EXE 
   Type Library:      {D3011EE1-B997-11CF-A6BB-0080C7B2D682} 
   version: 1.0  DISK1:[SMITH.DISPATCH_SAMPLE1]Server.tlb 
 
   1 - Location    Machine to run application 
   2 - Security    Security permissions for application 
   3 - Identity    User account to use to run application 
 
   (E to Exit to previous menu) 
   (H for Help) 
 
   Please enter Application Property you wish to change: 
------------------------------------------------------------------ 

If the system cannot find the type library file or if the type library is unaccessible, the system displays an error message next to the type library file name.

The options are as follows:


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
6539PRO_005.HTML