RMAdjToHandleList

From EDM2
Revision as of 21:35, 23 May 2020 by Ak120 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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);