RMHandleToType
From EDM2
This rmcall service returns the type of Resource Manager handle supplied.
Syntax
RMHandleToType(hHandle, HandleType);
Parameters
- hHandle (RMHANDLE) - input
- Handle whose type is to be determined.
- HandleType (APIRET) - output
- Pointer to variable to contain the returned handle type. The following handle types can be returned:
HandleType | Description | Service |
---|---|---|
HANDLE_TYPE_INVALID | Invalid Handle | None |
HANDLE_TYPE_DRIVER | Driver Handle | RMCreateDriver |
HANDLE_TYPE_ADAPTER | Adapter Handle | RMCreateAdapter |
HANDLE_TYPE_DEVICE | Device Handle | RMCreateDevice |
HANDLE_TYPE_RESOURCE | Resource Handle | RMAllocResource |
HANDLE_TYPE_LOGDEV | Logical Device Handle | RMCreateLDev |
HANDLE_TYPE_SYSDEV | System Name Handle | RMCreateSysName |
Return Code
- rc (USHORT) - returns
- On systems where the Resource Manager driver is not installed, the library interface code will return RMRC_NOT_INSTALLED.
- 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; APIRET HandleType; USHORT rc; rc = RMHandleToType(hHandle, HandleType);