Jump to content

RMGetNodeInfo: Difference between revisions

From EDM2
Created page with "This service is supported by both rminfo.dll and rmcalls.lib. It returns Resource Manager node information. ==Syntax== RMGetNodeInfo(hRMHandle, NodeInfo, NodeInfoSize); ==Pa..."
 
Ak120 (talk | contribs)
mNo edit summary
Line 3: Line 3:
  RMGetNodeInfo(hRMHandle, NodeInfo, NodeInfoSize);
  RMGetNodeInfo(hRMHandle, NodeInfo, NodeInfoSize);
==Parameters==
==Parameters==
; hRMHandle (RMHANDLE) - output : Resource Manager handle whose information is to be returned. The following handle types are allowed:
;hRMHandle (RMHANDLE) - output : Resource Manager handle whose information is to be returned. The following handle types are allowed:
 
{|
    ³HandleType                    ³Description                  ³
!HandleType||Description
    ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
    ³HANDLE_TYPE_DRIVER            ³Driver Handle                 ³
|HANDLE_TYPE_DRIVER||Driver Handle
    ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
    ³HANDLE_TYPE_ADAPTER          ³Adapter Handle               ³
|HANDLE_TYPE_ADAPTER||Adapter Handle
    ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
    ³HANDLE_TYPE_DEVICE            ³Device Handle                 ³
|HANDLE_TYPE_DEVICE||Device Handle
    ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
    ³HANDLE_TYPE_LOGDEV            ³Logical Device Handle         ³
|HANDLE_TYPE_LOGDEV||Logical Device Handle
    ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
|-
    ³HANDLE_TYPE_SYSDEV            ³System Name Handle           ³
|HANDLE_TYPE_SYSDEV||System Name Handle
|}
; NodeInfo (PRM_GETNODE_DATA) - output : Pointer to a buffer that will contain the Resource Manager node information in the RM_GETNODE_DATA, RM_NODE, and RESOURCELIST data structures.  
; NodeInfo (PRM_GETNODE_DATA) - output : Pointer to a buffer that will contain the Resource Manager node information in the RM_GETNODE_DATA, RM_NODE, and RESOURCELIST data structures.
 
; NodeInfoSize (USHORT) - input : Size of buffer pointed to by NodeInfo.
; NodeInfoSize (USHORT) - input : Size of buffer pointed to by NodeInfo.


==Return Code==
==Return Code==
; rc (APIRET) - returns : On systems where the Resource Manager driver is not installed, the library interface code will return RMRC_NOT_INSTALLED.
;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_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_BAD_ADAPTERHANDLE : 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_ADAPTERHANDLE : 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_BUFFER_TOO_SMALL : The buffer provided to receive information from a Resource Manager service was too small.
; RMRC_BUFFER_TOO_SMALL : The buffer provided to receive information from a Resource Manager service was too small.


==Remarks==
==Remarks==
None.  
None.


==Example Code==
==Example Code==
Line 45: Line 41:


rc = RMGetNodeInfo(hRMHandle, NodeInfo, NodeInfoSize);
rc = RMGetNodeInfo(hRMHandle, NodeInfo, NodeInfoSize);
</PRE>
</PRE>


[[Category:DevHlps]]
[[Category:DevHlps]]

Revision as of 20:21, 10 April 2019

This service is supported by both rminfo.dll and rmcalls.lib. It returns Resource Manager node information.

Syntax

RMGetNodeInfo(hRMHandle, NodeInfo, NodeInfoSize);

Parameters

hRMHandle (RMHANDLE) - output
Resource Manager handle whose information is to be returned. The following handle types are allowed:
HandleType Description
HANDLE_TYPE_DRIVER Driver Handle
HANDLE_TYPE_ADAPTER Adapter Handle
HANDLE_TYPE_DEVICE Device Handle
HANDLE_TYPE_LOGDEV Logical Device Handle
HANDLE_TYPE_SYSDEV System Name Handle
NodeInfo (PRM_GETNODE_DATA) - output
Pointer to a buffer that will contain the Resource Manager node information in the RM_GETNODE_DATA, RM_NODE, and RESOURCELIST data structures.
NodeInfoSize (USHORT) - input
Size of buffer pointed to by NodeInfo.

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_BAD_ADAPTERHANDLE
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_BUFFER_TOO_SMALL
The buffer provided to receive information from a Resource Manager service was too small.

Remarks

None.

Example Code

C

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

RMHANDLE            hRMHandle;
PRM_GETNODE_DATA    NodeInfo;
USHORT              NodeInfoSize;
APIRET              rc;

rc = RMGetNodeInfo(hRMHandle, NodeInfo, NodeInfoSize);