Jump to content

RMDevIDToHandleList: Difference between revisions

From EDM2
Created page with "This service is supported by both rminfo.dll and rmcalls.lib. It returns the list of handles of detect nodes that match the device IDs. ==Syntax== RMDevIDToHandleList(IDType..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 6: Line 6:
       SerialNumber, SearchFlags, hStartNode,
       SerialNumber, SearchFlags, hStartNode,
       pHndList);
       pHndList);
 
==Parameters==
==Parameters==
; IDType (IDTYPE) - input : The type of device ID. The following values are valid:
;IDType (IDTYPE) - input : The type of device ID. The following values are valid:
:;RM_IDTYPE_RM : Internal to Resource Manager.  
:;RM_IDTYPE_RM : Internal to Resource Manager.
:;RM_IDTYPE_EISA : EISA (also used for ISA PNP).  
:;RM_IDTYPE_EISA : EISA (also used for ISA PNP).
:;RM_IDTYPE_PCI : PCI device IDs.  
:;RM_IDTYPE_PCI : PCI device IDs.
:;RM_IDTYPE_LEGACY : Legacy device ID not defined by Intel.  
:;RM_IDTYPE_LEGACY : Legacy device ID not defined by Intel.
 
;DeviceID (DEVID) - input : Uniquely identifies the particular device or adapter.
; DeviceID (DEVID) - input : Uniquely identifies the particular device or adapter.  
;FunctionID (DEVID) - input : Uniquely identifies a function located on a multi-function adapter.
 
;CompatibleID (DEVID) - input : Provides the device IDs of other compatible devices.
; FunctionID (DEVID) - input : Uniquely identifies a function located on a multi-function adapter.  
;VendorID (VENDID) - input : Provides the vendor ID for the device.
 
;SerialNumber (SERNUM) - input : Provides the serial number for the device.
; CompatibleID (DEVID) - input : Provides the device IDs of other compatible devices.  
;SearchFlags (ULONG) - input : Indicates the type of search to be executed. The following combination of searches are valid:
 
:;SEARCH_ID_DEVICEID : Search on adapter ID only.
; VendorID (VENDID) - input : Provides the vendor ID for the device.  
:;SEARCH_ID_FUNCTIONID : Search on function ID only.
 
:;SEARCH_ID_COMPATIBLEID : Search on compatible ID only.
; SerialNumber (SERNUM) - input : Provides the serial number for the device.  
;hStartNode (HDETECTED) - input : The handle of the Resource Manager node at which to start the search. The following pseudohandles are supported:
 
:;HANDLE_PREVIOUS_DETECTED : Previously detected nodes.
; SearchFlags (ULONG) - input : Indicates the type of search to be executed. The following combination of searches are valid:
:;HANDLE_CURRENT_DETECTED : Current detected nodes.
 
;pHndList (PHANDLELIST) - output : Pointer to array of detected handles that match the detected IDs.
:;SEARCH_ID_DEVICEID : Search on adapter ID only.  
:;SEARCH_ID_FUNCTIONID : Search on function ID only.  
:;SEARCH_ID_COMPATIBLEID : Search on compatible ID only.  
 
; hStartNode (HDETECTED) - input : The handle of the Resource Manager node at which to start the search. The following pseudohandles are supported:
 
:;HANDLE_PREVIOUS_DETECTED : Previously detected nodes.  
:;HANDLE_CURRENT_DETECTED : Current detected nodes.  
 
; pHndList (PHANDLELIST) - output : Pointer to array of detected handles that match the detected IDs.


==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_BAD_DETECTHANDLE
    RMRC_BAD_DETECTHANDLE
RMRC_INVALID_PARM_VALUE
    RMRC_INVALID_PARM_VALUE
RMRC_NULL_POINTER
    RMRC_NULL_POINTER
RMRC_SUCCESS
    RMRC_SUCCESS


==Example Code==
==Example Code==
===C===
;C
<PRE>
<PRE>
#include <os2.h>
#include <os2.h>

Latest revision as of 18:14, 5 April 2025

This service is supported by both rminfo.dll and rmcalls.lib. It returns the list of handles of detect nodes that match the device IDs.

Syntax

RMDevIDToHandleList(IDType, DeviceID,
      FunctionID, CompatibleID, VendorID,
      SerialNumber, SearchFlags, hStartNode,
      pHndList);

Parameters

IDType (IDTYPE) - input
The type of device ID. The following values are valid:
RM_IDTYPE_RM
Internal to Resource Manager.
RM_IDTYPE_EISA
EISA (also used for ISA PNP).
RM_IDTYPE_PCI
PCI device IDs.
RM_IDTYPE_LEGACY
Legacy device ID not defined by Intel.
DeviceID (DEVID) - input
Uniquely identifies the particular device or adapter.
FunctionID (DEVID) - input
Uniquely identifies a function located on a multi-function adapter.
CompatibleID (DEVID) - input
Provides the device IDs of other compatible devices.
VendorID (VENDID) - input
Provides the vendor ID for the device.
SerialNumber (SERNUM) - input
Provides the serial number for the device.
SearchFlags (ULONG) - input
Indicates the type of search to be executed. The following combination of searches are valid:
SEARCH_ID_DEVICEID
Search on adapter ID only.
SEARCH_ID_FUNCTIONID
Search on function ID only.
SEARCH_ID_COMPATIBLEID
Search on compatible ID only.
hStartNode (HDETECTED) - input
The handle of the Resource Manager node at which to start the search. The following pseudohandles are supported:
HANDLE_PREVIOUS_DETECTED
Previously detected nodes.
HANDLE_CURRENT_DETECTED
Current detected nodes.
pHndList (PHANDLELIST) - output
Pointer to array of detected handles that match the detected IDs.

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_BAD_DETECTHANDLE
RMRC_INVALID_PARM_VALUE
RMRC_NULL_POINTER
RMRC_SUCCESS

Example Code

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

IDTYPE         IDType;
DEVID          DeviceID;
DEVID          FunctionID;
DEVID          CompatibleID;
VENDID         VendorID;
SERNUM         SerialNumber;
ULONG          SearchFlags;
HDETECTED      hStartNode;
PHANDLELIST    pHndList;
APIRET         rc;

rc = RMDevIDToHandleList(IDType, DeviceID,
       FunctionID, CompatibleID, VendorID,
       SerialNumber, SearchFlags, hStartNode,
       pHndList);