Jump to content

RMConvertID

From EDM2
Revision as of 20:54, 30 July 2018 by Martini (talk | contribs) (Created page with "This service is supported by both rminfo.dll and rmcalls.lib. It either converts a device ID to a string or it converts a string to device ID. For example, the device ID 0x32A...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This service is supported by both rminfo.dll and rmcalls.lib. It either converts a device ID to a string or it converts a string to device ID. For example, the device ID 0x32A0D041 is equivalent to the string "PNPA032".

Syntax

RMConvertID(pID, String, Direction);

Parameters

pID (PULONG) - output
The integer value of the device ID. The following are possible values:
  Bits[15:0]
       Three character compressed ASCII EISA ID.
  Bits[31:16]
       Manufacturer-specific function number and revision. 
String (PSZ) - output
This is a pointer to a 9 character-long string array.
Direction (USHORT) - output
Can be one of the following values:
       RM_CONVERT_TO_TEXT
       RM_CONVERT_TO_ID 

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_INVALID_PARM_VALUE
   RMRC_SUCCESS


Example Code

C

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

PULONG    pID;
PSZ       String;
USHORT    Direction;
APIRET    rc;

rc = RMConvertID(pID, String, Direction);