Jump to content

DisableDeviceContext: Difference between revisions

From EDM2
Created page with "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 resource..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
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.  
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==
==Syntax==
Line 5: Line 5:


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


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


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


==Sample Code==
==Sample Code==
Line 36: Line 28:


rc = DisableDeviceContext(ulSubfunction, pParam1, pParam2);
rc = DisableDeviceContext(ulSubfunction, pParam1, pParam2);
</PRE>
</PRE>


[[Category:Gre]]
[[Category:Gre]]

Latest revision as of 07:57, 5 March 2020

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