Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Sun Adapter for COM/DCOM API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.stc.connector.comadapter.comruntime
Interface STCComRuntime

All Known Implementing Classes:
  STCComRuntimeImpl

    public interface STCComRuntime

STCComRuntime interface.

Method Summary
`int` | `create(java.lang.String clsidString, java.lang.String server)` Creates an instance of the COM object specified by the CLSID string and server (if DCOM component).
`void` | `initialize()` CoInitializes the current thread.
`java.lang.String` | `resolveSystemErrorText(int hr)` A convenience method exposed to allow the user to get the error text for an HRESULT.
`void` | `uninitialize()` CoUninitializes the current thread.

Method Detail

### initialize

    void initialize()

  CoInitializes the current thread.

  Parameters:
    None.

  Throws:
    `STCComException` - Thrown if CoInitialize fails.

### uninitialize

    void uninitialize()

  CoUninitializes the current thread.

  Parameters:
    None.

### create

    int create(java.lang.String clsidString,
               java.lang.String server)
               throws STCComException

  Creates an instance of the COM object specified by the CLSID string and server (if DCOM component).

  Parameters:
    `clsidString` - The CLSID string of the COM object you wish to create. Note that the component must be automation-compatible.
    `server` - The server on which the DCOM component resides. This parameter can be null if not a DCOM component.
  Returns:
    `int` - Returns an interface handle for the specified CLSID string.
  Throws:
    `STCComException` - Thrown if creation of the instance fails.

### resolveSystemErrorText

    java.lang.String resolveSystemErrorText(int hr)

  A convenience method exposed to allow the user to get the error text for an HRESULT. The Method routes down to the FormatMessage method in the Win32 API.

  Parameters:
    `hr` - The HRESULT from the method that failed..
  Returns:
    `String` - Returns the error message from operating system, if any.
  Throws:
    None.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Sun Adapter for COM/DCOM API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1994-2008 Sun Microsystems, Inc. All rights reserved.