Difference between revisions of "RMAdjToHandleList"
From EDM2
(Created page with "This rmcall service updates an adjunct data structure. It also searches for Resource Manager nodes that match the adjunct structure specified. A list of node handles and adjun...") |
m |
||
Line 1: | Line 1: | ||
− | This rmcall service updates an adjunct data structure. It also searches for Resource Manager nodes that match the adjunct structure specified. A list of node handles and adjunct indices are in the HandleList structure provided by the caller. | + | This rmcall service updates an adjunct data structure. It also searches for Resource Manager nodes that match the adjunct structure specified. A list of node handles and adjunct indices are in the HandleList structure provided by the caller. |
==Syntax== | ==Syntax== | ||
Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
− | ; | + | ;AdjunctData (PADJUNCT) - output : Pointer to an adjunct structure to search for. |
− | + | :The [[ADJUNCT]] type contains a union of data structures of varying lengths. When searching for a particular adjunct, set the length field of the AdjunctData structure that was passed, to the exact length of the adjunct structure being located. For example: | |
− | : The ADJUNCT type contains a union of data structures of varying lengths. When searching for a particular adjunct, set the length field of the AdjunctData structure that was passed, to the exact length of the adjunct structure being located. For example: | + | :{| |
− | + | | | |
− | + | /* Correct */ | |
− | + | ||
− | + | AdjData.AdjLength = ADJ_HEADER_SIZE + sizeof(ADD_UNIT); | |
− | + | ||
− | + | /* Incorrect */ | |
− | + | ||
− | + | AdjData.AdjLength = sizeof(ADJUNCT); | |
− | + | |} | |
− | ; hStartNode (HADAPTER) - input : Handle of resource manager node at which to start the search. | + | ;hStartNode (HADAPTER) - input: Handle of resource manager node at which to start the search. |
− | + | ;AdjHandleList (PADJHANDLELIST) - output: Pointer to the [[ADJHANDLELIST]] and [[ADJINFO]] structures. | |
− | ; AdjHandleList (PADJHANDLELIST) - output : Pointer to the ADJHANDLELIST and ADJINFO structures. | + | |
==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_NULL_POINTER : A Resource Manager service received a NULL value for a pointer that was expected to contain a valid 16:16 address. |
− | + | ::RMRC_INVALID_PARM_VALUE : A nonhandle or nonpointer variable contains an invalid or out-of-range value because: | |
− | RMRC_NULL_POINTER : A Resource Manager service received a NULL value for a pointer that was expected to contain a valid 16:16 address. | + | ::* An invalid decode width was specified when allocating an I/O Port range. |
− | + | ::* A handle search is being performed with cMaxHandles set to 0. | |
− | RMRC_INVALID_PARM_VALUE : A nonhandle or nonpointer variable contains an invalid or out-of-range value because: | + | ::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. |
− | * An invalid decode width was specified when allocating an I/O Port range. | + | |
− | * A handle search is being performed with cMaxHandles set to 0. | + | |
− | + | ||
− | 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. | + | |
==Remarks== | ==Remarks== | ||
− | None. | + | None. |
==Example Code== | ==Example Code== | ||
Line 48: | Line 43: | ||
APIRET rc; | APIRET rc; | ||
− | rc = RMAdjToHandleList(AdjunctData, hStartNode, | + | rc = RMAdjToHandleList(AdjunctData, hStartNode, AdjHandleList); |
− | + | ||
− | + | ||
</PRE> | </PRE> | ||
− | |||
− | |||
[[Category:DevHlps]] | [[Category:DevHlps]] |
Latest revision as of 21:35, 23 May 2020
This rmcall service updates an adjunct data structure. It also searches for Resource Manager nodes that match the adjunct structure specified. A list of node handles and adjunct indices are in the HandleList structure provided by the caller.
Syntax
RMAdjToHandleList(AdjunctData, hStartNode, AdjHandleList);
Parameters
- AdjunctData (PADJUNCT) - output
- Pointer to an adjunct structure to search for.
- The ADJUNCT type contains a union of data structures of varying lengths. When searching for a particular adjunct, set the length field of the AdjunctData structure that was passed, to the exact length of the adjunct structure being located. For example:
/* Correct */ AdjData.AdjLength = ADJ_HEADER_SIZE + sizeof(ADD_UNIT); /* Incorrect */ AdjData.AdjLength = sizeof(ADJUNCT);
- hStartNode (HADAPTER) - input
- Handle of resource manager node at which to start the search.
- AdjHandleList (PADJHANDLELIST) - output
- Pointer to the ADJHANDLELIST and ADJINFO structures.
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_NULL_POINTER : A Resource Manager service received a NULL value for a pointer that was expected to contain a valid 16:16 address.
- 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.
- 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.
Remarks
None.
Example Code
C
#include <os2.h> #include <rmcalls.h> PADJUNCT AdjunctData; HADAPTER hStartNode; PADJHANDLELIST AdjHandleList; APIRET rc; rc = RMAdjToHandleList(AdjunctData, hStartNode, AdjHandleList);