Windows 3.1 Device Drivers (ddag31qh.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Control
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
WORD Control(lpDestDev, wFunction, lpInData, lpOutData)
LPPDEVICE lpDestDev;
WORD wFunction;
LPSTR lpInData;
LPSTR lpOutData;
The Control function carries out the device-specific extension specified by
the wFunction parameter. GDI calls Control when an application calls the
Escape function (GDI.38). For this reason, the device-specific extensions
are also called escapes.
Every graphics driver must export a Control function.
Parameter Description
────────────────────────────────────────────────────────────────────────────
lpDestDev Points to a PDEVICE structure specifying the destination device.
wFunction Specifies the escape to carry out. Although the number of
wFunction values and the meaning of each value depends on the
driver, GDI reserves a number of values to specify predefined
escapes. For more information about predefined escapes, see
Chapter 11, "Graphics-Driver Escapes."
lpInData Points to escape-specific input data.
lpOutData Points to escape-specific output data.
Return Value
The return value depends on the escape function specified by the wFunction
parameter. In general, positive values indicate success, negative values
indicate an error, and zero can indicate either an unimplemented escape or a
general error condition.
Comments
The export ordinal for this function is 3.
The Control function should always return zero for escapes that are
unimplemented or unrecognized. The function should return the number of
bytes copied if it copies data to a buffer pointed to by the lpOutData
parameter, or if the lpOutData parameter is NULL, it should return the size
in bytes of the buffer it requires to copy data.
GDI modifies some escapes before calling the Control function.
♦