Enabling COM Call-In

For a COM client to use Uniface services it needs to know the components’ interface definitions. These are contained in a standard Microsoft Windows type library, which is contained in a standard Microsoft Windows self-registering DLL. The type library DLL must be installed on the client workstation and the client’s Registry settings must point to the server workstation.

  1. In the Signature Editor, define the COM call-in properties of the component. Click Properties, then double-click the COM entry. Set the ProgID and CLSID properties.
  2. Compile the component signature.
  3. If necessary, update the UAR file.
  4. Export the signature as a type library. Use the following command to create the self-registering COM interface DLL:

    ide /sto /mwr=COM /cfg=ConfigNameDLLFileService 1 Service{... n}

    • /sto—activates the Export facility.
    • /mwr=COM—specifies the COM middleware connector.
    • /cfg=ConfigName—name of a configuration definition that specifies the Uniface environment in which you want to execute the services. You can create this definition using the Uniface COM Configuration tool, by which you specify different combinations of .ini, .asn, and startup shells.
    • DLLFile—name of the self-registering COM interface DLL that is created.
    • SignatureList—space-separated list of signatures of Uniface services for which an interface DLL will be generated. At least one service must be specified.
  5. Copy the type library to the client machine and register it. Use the standard Microsoft Windows regsvr32.exe program to register the required type library.

    For example:

    regsvr32 servs.dll

    To unregister a type library, use the /u switch. For example:

    regsvr32 /u servs.dll
  6. Create a configuration definition for the ConfigName in the Registry using the Uniface COM Configuration utility.
    1. Choose Uniface COM Configuration from the Windows Start menu.
    2. Click New and provide a name for the definition.
    3. Set the values for the configuration files and directories required by the application. For more information, see Settings for Selected Configuration Definition.
    4. Click OK or Apply to save the definition.

    Note:  For deployment within large organizations, .reg (registry) files can be used, or a third-party installation tool.

If you get the following error when generating a type library, delete the signature, recreate it and run the /sto command again command again.

Error: COM component generation
		failed: component.getDefaultExecMode()

Related Topics