RMADDToHDevice

This rmcall service maps an ADD/DM handle to a Resource Manager device handle and converts an ADD/DM ADD Handle and ADD/DM UnitHandle to a corresponding Resource Manager device handle. This is done by searching the Resource Manager physical device tree for a node that contains an ADJ_ADD_UNIT adjunct, which matches the supplied ADD Handle and ADD UnitHandle.

Syntax
rc = RMADDToHDevice(hDevice, ADDHandle, UnitHandle);

Parameters

 * hDevice (PHDEVICE) - output : Pointer to variable to receive device handle of device with a matching ADDHandle and UnitHandle.


 * ADDHandle (USHORT) - input : Handle of the ADD driver assigned by DevHelp_RegisterDeviceClass.


 * UnitHandle (USHORT) - input : UnitHandle the ADD driver assigned to this device.

Return Code

 * rc (APIRET) - returns:On systems where the Resource Manager driver is not installed, the library interface code will return
 * RMRC_NOT_INSTALLED and will set hDevice to -1L.
 * RMRC_IRQ_ENTRY_ILLEGAL - A Resource Manager service was issued at interrupt time. The Resource Manager service request can be issued only at task time or INIT time.
 * RMRC_NULL_POINTER - A Resource Manager service received a NULL value for a pointer that was expected to contain a valid 16:16 address.

Remarks
Use RMAdjToHandleList rather than this service to maintain compatibility with future Resource Manager releases. This service will be removed in a future Resource Manager release.

Refer to the Storage Device Driver Reference for additional information on ADD/DM architecture.

C

 * 1) include 
 * 2) include 

PHDEVICE   hDevice; USHORT     ADDHandle; USHORT     UnitHandle; APIRET     rc;

rc = RMADDToHDevice(hDevice, ADDHandle, UnitHandle); 