RMConvertID: Difference between revisions
Appearance
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..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
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". | 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== | ==Syntax== | ||
Line 5: | Line 5: | ||
==Parameters== | ==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== | ==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_INVALID_PARM_VALUE | |||
*RMRC_SUCCESS | |||
==Example Code== | ==Example Code== | ||
Line 39: | Line 31: | ||
rc = RMConvertID(pID, String, Direction); | rc = RMConvertID(pID, String, Direction); | ||
</PRE> | </PRE> | ||
[[Category:DevHlps]] | [[Category:DevHlps]] |
Latest revision as of 12:48, 7 June 2021
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);