# dispAttachHandle

Creates a client handle to the object referenced by the descriptor and attaches to the associated object.

#### Prototype

DWORD dispAttachHandle (char *descriptor, unsigned *hd )

Argument | Description
descriptor | Pointer to an object handle descriptor.
hd | Pointer to the returned handle for a specified descriptor.

#### Return values

Return value | Description
SUCCESS |
CTAERR_BAD_ARGUMENT | Invalid descriptor or NULL handle pointer.
CTAERR_NOT_FOUND | Unable to locate object.
CTAERR_NOT_INITIALIZED | Natural Access was not initialized.
CTAERR_SVR_COMM | Natural Access Server is not running.

#### Details

dispAttachHandle enables services opened on shared contexts to share service objects. To use this function, the service must be provided with an object descriptor by the application.

This function creates a new entry in the dispatcher's handle mapping table and returns a client-side service object handle referencing the shared object.