RMHDevToHLDev

From EDM2
Jump to: navigation, search

This rmcall service returns physical devices associated with logical devices and returns the Logical Device handle (HLDEV) associated with the physical device handle indicated.

Syntax

RMHDevToHLDev(hDevice, hStartLDev, hLDev);

Parameters

hDevice (HDEVICE) - input 
Resource Manager handle to the physical device. The logical device handle that is associated with this physical device handle will be returned.
hStartLDev (HLDEV) - output 
Handle of the logical device at which to start the search. If all logical nodes are to be searched, then HANDLE_LDEV_ROOT should be specified.
hLDev (PHLDEV) - output 
Pointer to the variable to receive the logical device handle (HLDEV) associated with the physical device specified.

Return Code

rc (APIRET) - returns 
On systems where the Resource Manager driver is not installed, the library interface code will return RMRC_NOT_INSTALLED.
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.
RMRC_BAD_DEVICEHANDLE 
The expected Resource Manager handles were not provided because the handle was not a valid Resource Manager handle or the handle did not point to the type of object the service required.

Remarks

None.

Example Code

C

#include <os2.h>
#include <rmcalls.h>

HDEVICE    hDevice;
HLDEV      hStartLDev;
PHLDEV     hLDev;
APIRET     rc;

rc = RMHDevToHLDev(hDevice, hStartLDev, hLDev);