RMHandleToType: Difference between revisions
Appearance
Created page with "This rmcall service returns the type of Resource Manager handle supplied. ==Syntax== RMHandleToType(hHandle, HandleType); ==Parameters== ; hHandle (RMHANDLE) - input : Han..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
This rmcall service returns the type of Resource Manager handle supplied. | This rmcall service returns the type of Resource Manager handle supplied. | ||
==Syntax== | ==Syntax== | ||
RMHandleToType(hHandle, HandleType); | RMHandleToType(hHandle, HandleType); | ||
==Parameters== | ==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 (APIRET) - output : Pointer to variable to contain the returned handle type. The following handle types can be returned: | {|class="wikitable" | ||
!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== | ==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_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. | :;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== | ==Remarks== | ||
None. | None. | ||
==Example Code== | ==Example Code== |
Latest revision as of 01:40, 8 September 2018
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);