# dispUnregisterWaitObject

Used by services to remove the registration of wait objects and their respective processing functions with a Natural Access queue.

#### Prototype

DWORD dispUnregisterWaitObject (CTAQUEUEHD ctaqueuehd, CTA_WAITOBJ *waitobj)

Argument | Description
ctaqueuehd | Handle returned by ctaCreateQueue.
waitobj | Pointer to the wait object to unregister.

#### Return values

Return value | Description
SUCCESS |
CTAERR_BAD_ARGUMENT | Function argument has an invalid value or a required pointer argument is NULL
CTAERR_INVALID_CTAQUEUEHD | Invalid ctaqueuehd was passed.
CTAERR_NOT_FOUND | Specified wait object does not exist.
CTAERR_NOT_INITIALIZED | Natural Access is not initialized.

#### Details

dispUnregisterWaitObject is used by services and service managers to remove the registration of wait objects with the Natural Access queue. It should be called from the detach/close binding function corresponding to the attach/open binding function from which the wait object was registered.

#### See also

dispRegisterWaitObject, xxxCloseServiceManager, xxxDetachServiceManager