RMHandleToParent
Appearance
This rmcall service returns the parent handle of the handle provided.
Syntax
RMHandleToParent(hHandle, hParent);
Parameters
- hHandle (RMHANDLE) - input
- Handle whose parent is to be determined. Valid handle types for this service include:
HandleType Description HANDLE_TYPE_ADAPTER Adapter Handle HANDLE_TYPE_DEVICE Device Handle HANDLE_TYPE_RESOURCE Resource Handle HANDLE_TYPE_LOGDEV Logical Device Handle HANDLE_TYPE_SYSDEV System Name Handle
The parent of a resource handle is considered to be the owner of the resource.
- hParent (PRMHANDLE) - output
- Handle of the parent of the specified handle.
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> RMHANDLE hHandle; PRMHANDLE hParent; APIRET rc; rc = RMHandleToParent(hHandle, hParent);