Jump to content

RMDeAllocResource: Difference between revisions

From EDM2
Created page with "This service is supported by both rminfo.dll and rmcalls.lib. It destroys a resource handle created by RMAllocResource. ==Syntax== RMDeAllocResource(hDriver, hResource); ==..."
 
No edit summary
Line 4: Line 4:
  RMDeAllocResource(hDriver, hResource);
  RMDeAllocResource(hDriver, hResource);
==Parameters==
==Parameters==
;  hDriver (HDRIVER) - input : Handle of the driver when supplied the resource was created.  
''hDriver'' ([[HDRIVER]]) - input : Handle of the driver when supplied the resource was created.  
; hResource (HRESOURCE) - input : Handle of the resource to be destroyed.
; ''hResource'' ([[HRESOURCE]]) - input : Handle of the resource to be destroyed.


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

Revision as of 03:20, 22 May 2025

This service is supported by both rminfo.dll and rmcalls.lib. It destroys a resource handle created by RMAllocResource.

Syntax

RMDeAllocResource(hDriver, hResource);

Parameters

hDriver (HDRIVER) - input
Handle of the driver when supplied the resource was created.
hResource (HRESOURCE) - input
Handle of the resource 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_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;
HRESOURCE    hResource;
APIRET       rc;

rc = RMDeAllocResource(hDriver, hResource);