Jump to content

RMHandleToType: Difference between revisions

From EDM2
Created page with "This rmcall service returns the type of Resource Manager handle supplied. ==Syntax== RMHandleToType(hHandle, HandleType); ==Parameters== ; hHandle (RMHANDLE) - input : Han..."
 
Ak120 (talk | contribs)
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.  
;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
    '''³HandleType          ³Description        ³Service'''
|-
    ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|HANDLE_TYPE_INVALID||Invalid Handle||None
    ³HANDLE_TYPE_INVALID ³Invalid Handle     ³None                ³
|-
    ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|HANDLE_TYPE_DRIVER||Driver Handle||RMCreateDriver
    ³HANDLE_TYPE_DRIVER  ³Driver Handle       ³RMCreateDriver      ³
|-
    ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|HANDLE_TYPE_ADAPTER||Adapter Handle||RMCreateAdapter
    ³HANDLE_TYPE_ADAPTER ³Adapter Handle     ³RMCreateAdapter    ³
|-
    ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|HANDLE_TYPE_DEVICE||Device Handle||RMCreateDevice
    ³HANDLE_TYPE_DEVICE  ³Device Handle       ³RMCreateDevice      ³
|-
    ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|HANDLE_TYPE_RESOURCE||Resource Handle||RMAllocResource
    ³HANDLE_TYPE_RESOURCE³Resource Handle     ³RMAllocResource    ³
|-
    ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|HANDLE_TYPE_LOGDEV||Logical Device Handle||RMCreateLDev
    ³HANDLE_TYPE_LOGDEV  ³Logical Device     ³RMCreateLDev        ³
|-
    ³                    ³Handle              ³                    ³
|HANDLE_TYPE_SYSDEV||System Name Handle||RMCreateSysName
    ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|}
    ³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.
;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);