Jump to content

DisablePhysicalDeviceBlock

From EDM2
Revision as of 02:57, 31 December 2019 by Martini (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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