Jump to content

RMDestroyDevice

From EDM2
Revision as of 00:05, 1 August 2018 by Martini (talk | contribs) (Created page with "This rmcall service destroys a device handle and releases a device handle created by RMCreateDevice. Any resources assigned to the device are released and the device is destro...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This rmcall service destroys a device handle and releases a device handle created by RMCreateDevice. Any resources assigned to the device are released and the device is destroyed.

Syntax

RMDestroyDevice(hDriver, hDevice);

Parameters

hDriver (HDRIVER) - input
Handle of the driver supplied when device was created.
hDevice (HDEVICE) - input
Handle of the the device to be destroyed.

Return Code

rc (APIRET) - returns
On systems where the Resource Manager driver is not installed, the library interface code will return RMRC_SUCCESS.
; 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.

Remarks

None.

Example Code

C

#include <os2.h>
#include <rmcalls.h>

HDRIVER    hDriver;
HDEVICE    hDevice;
APIRET     rc;

rc = RMDestroyDevice(hDriver, hDevice);