Jump to content

DisableDeviceContext

From EDM2
Revision as of 07:57, 5 March 2020 by Ak120 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

OS2_PM_DRV_ENABLE: DisableDeviceContext is called when a device context is about to be deleted. In response, the presentation driver must release any memory and other resources that it has allocated for the DC.

Syntax

DisableDeviceContext(ulSubfunction, pParam1, pParam2);

Parameters

ulSubfunction (ULONG) - input
06H.
pParam1 (PULONG) - input
A pointer (pInstance) to the DC instance data.
pParam2 (PLONG) - input
Not used.

Return Code

rc (LONG) - returns
Return codes.
The handling routine should return a LONG integer. Valid values are:
  • 0 Successful
  • -1 Error

Remarks

The presentation driver uses the DC instance data to identify this memory.

Sample Code

#include <os2.h>

ULONG     ulSubfunction;  /*  06H. */
PULONG    pParam1;
PLONG     pParam2;        /*  Not used. */
LONG      rc;             /*  Return codes. */

rc = DisableDeviceContext(ulSubfunction, pParam1, pParam2);