Jump to content

DisablePhysicalDeviceBlock: Difference between revisions

From EDM2
Created page with "OS2_PM_DRV_ENABLE: DisablePhysicalDeviceBlock is called by the system to disable the specified device and to free any associated memory. ==Syntax== DisablePhysicalDeviceBlo..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
OS2_PM_DRV_ENABLE: DisablePhysicalDeviceBlock is called by the system to disable the specified device and to free any associated memory.  
OS2_PM_DRV_ENABLE: DisablePhysicalDeviceBlock is called by the system to disable the specified device and to free any associated memory.


==Syntax==
==Syntax==
Line 5: Line 5:


==Parameters==
==Parameters==
;ulSubfunction (ULONG) - input  
;ulSubfunction (ULONG) - input:04H.
:04H.  
;ulParam1 (ULONG) - input:A handle or pointer, ulStateInfo, to physical device block.
 
;pParam2 (PLONG) - input:Not used.
;ulParam1 (ULONG) - input  
:A handle or pointer, ulStateInfo, to physical device block.  
 
;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==
Presentation drivers for the primary display device return a value of 0 (zero) without taking any action.  
Presentation drivers for the primary display device return a value of 0 (zero) without taking any action.


;Note: The operating system never calls this subfunction in the hardcopy driver if the driver uses one physical device block to support multiple device contexts. Presentation drivers notify the operating system of this capability by not setting bit 0 of the Logical Device flags returned to the system from the FillLogicalDeviceBlock subroutine.  
;Note: The operating system never calls this subfunction in the hardcopy driver if the driver uses one physical device block to support multiple device contexts. Presentation drivers notify the operating system of this capability by not setting bit 0 of the Logical Device flags returned to the system from the FillLogicalDeviceBlock subroutine.


==Sample Code==
==Sample Code==
Line 36: Line 29:
LONG    rc;            /*  Return codes. */
LONG    rc;            /*  Return codes. */


rc = DisablePhysicalDeviceBlock(ulSubfunction,
rc = DisablePhysicalDeviceBlock(ulSubfunction, ulParam1, pParam2);
      ulParam1, pParam2);
 
</PRE>
</PRE>


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

Latest revision as of 07:58, 5 March 2020

OS2_PM_DRV_ENABLE: DisablePhysicalDeviceBlock is called by the system to disable the specified device and to free any associated memory.

Syntax

DisablePhysicalDeviceBlock(ulSubfunction, ulParam1, pParam2);

Parameters

ulSubfunction (ULONG) - input
04H.
ulParam1 (ULONG) - input
A handle or pointer, ulStateInfo, to physical device block.
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

Presentation drivers for the primary display device return a value of 0 (zero) without taking any action.

Note
The operating system never calls this subfunction in the hardcopy driver if the driver uses one physical device block to support multiple device contexts. Presentation drivers notify the operating system of this capability by not setting bit 0 of the Logical Device flags returned to the system from the FillLogicalDeviceBlock subroutine.

Sample Code

#include <os2.h>

ULONG    ulSubfunction;  /*  04H. */
ULONG    ulParam1;
PLONG    pParam2;        /*  Not used. */
LONG     rc;             /*  Return codes. */

rc = DisablePhysicalDeviceBlock(ulSubfunction, ulParam1, pParam2);