Jump to content

RMModifyResources

From EDM2

This rmcall service modifies adapter or device resource sets and also allows for modification of resources owned by an existing adapter or device. Resource handles can be deleted or added to an adapter or device.

Syntax

RMModifyResources(hDriver, hAdapter, ModifyAction, hResource);

Parameters

hDriver (HDRIVER) - input
Driver handle of the device driver that created the adapter or device.
hAdapter (HADAPTER) - output
Handle of the adapter or device whose resource set is to be modified.
ModifyAction (USHORT) - input
RM_MODIFY_ADD
Add the resource handle indicated to the adapter or device.
RM_MODIFY_DELETE
Delete the resource handle indicated.
Deleting a resource implicitly causes an RMDeallocResource to occur; for example, the resource handle is no longer valid.
hResource (HRESOURCE) - input
Handle of the resource to be added or deleted.

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_ADAPTERHANDLE
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_RESOURCEHANDLE
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>

HDRIVER      hDriver;
HADAPTER     hAdapter;
USHORT       ModifyAction;
HRESOURCE    hResource;
APIRET       rc;

rc = RMModifyResources(hDriver, hAdapter,
       ModifyAction, hResource);