RMUpdateAdjunct: Difference between revisions
Appearance
Created page with "This rmcall service updates an existing adjunct structure. ==Syntax== RMUpdateAdjunct(hDriver, hDevice, AdjunctIndex, AdjunctData); ==Parameters== ; hDriver (HDRIVER) - ..." |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
This rmcall service updates an existing adjunct structure. | This rmcall service updates an existing adjunct structure. | ||
==Syntax== | ==Syntax== | ||
RMUpdateAdjunct(hDriver, hDevice, AdjunctIndex, AdjunctData); | RMUpdateAdjunct(hDriver, hDevice, AdjunctIndex, AdjunctData); | ||
==Parameters== | ==Parameters== | ||
; | ;hDriver (HDRIVER) - input : Driver handle of the device driver that created the adjunct data. | ||
;hDevice (HDEVICE) - input : Device handle with which the adjunct data is associated. | |||
; hDevice (HDEVICE) - input : Device handle with which the adjunct data is associated. | ;AdjunctIndex (USHORT) - input : Index to the adjunct structure to be replaced. | ||
;AdjunctData (PADJUNCT) - output : Pointer to an adjunct structure containing replacement data for the adjunct indicated. | |||
; AdjunctIndex (USHORT) - input : Index to the adjunct structure to be replaced. | |||
; AdjunctData (PADJUNCT) - output : Pointer to an adjunct structure containing replacement data for the adjunct indicated. | |||
==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. | ||
:;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_DRIVERHANDLE : 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_DRIVERHANDLE : 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. | :;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_INVALID_PARM_VALUE : A nonhandle or nonpointer variable contains an invalid or out-of-range value because: | :;RMRC_INVALID_PARM_VALUE : A nonhandle or nonpointer variable contains an invalid or out-of-range value because: | ||
::*An invalid decode width was specified when allocating an I/O Port range. | ::*An invalid decode width was specified when allocating an I/O Port range. | ||
Line 24: | Line 21: | ||
==Remarks== | ==Remarks== | ||
For Resource Manager version 1.1, the size of the replacement adjunct structure must not exceed the size of the existing adjunct. | For Resource Manager version 1.1, the size of the replacement adjunct structure must not exceed the size of the existing adjunct. | ||
==Example Code== | ==Example Code== | ||
Line 38: | Line 35: | ||
APIRET rc; | APIRET rc; | ||
rc = RMUpdateAdjunct(hDriver, hDevice, AdjunctIndex, | rc = RMUpdateAdjunct(hDriver, hDevice, AdjunctIndex, AdjunctData); | ||
</PRE> | </PRE> | ||
[[Category:DevHlps]] | [[Category:DevHlps]] |
Latest revision as of 03:38, 22 May 2025
This rmcall service updates an existing adjunct structure.
Syntax
RMUpdateAdjunct(hDriver, hDevice, AdjunctIndex, AdjunctData);
Parameters
- hDriver (HDRIVER) - input
- Driver handle of the device driver that created the adjunct data.
- hDevice (HDEVICE) - input
- Device handle with which the adjunct data is associated.
- AdjunctIndex (USHORT) - input
- Index to the adjunct structure to be replaced.
- AdjunctData (PADJUNCT) - output
- Pointer to an adjunct structure containing replacement data for the adjunct indicated.
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_DRIVERHANDLE
- 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.
- RMRC_INVALID_PARM_VALUE
- A nonhandle or nonpointer variable contains an invalid or out-of-range value because:
- An invalid decode width was specified when allocating an I/O Port range.
- A handle search is being performed with cMaxHandles set to 0.
Remarks
For Resource Manager version 1.1, the size of the replacement adjunct structure must not exceed the size of the existing adjunct.
Example Code
C
#include <os2.h> #include <rmcalls.h> HDRIVER hDriver; HDEVICE hDevice; USHORT AdjunctIndex; PADJUNCT AdjunctData; APIRET rc; rc = RMUpdateAdjunct(hDriver, hDevice, AdjunctIndex, AdjunctData);