WORD Enable(
LPVOID lpDevInfo,
WORD wAction,
LPSTR lpDestDevType,
LPSTR lpOutputFile,
LPVOID lpData
);
Initializes software and hardware for the specified driver. Every graphics driver must export an Enable function.
0x0000 | Initializes the driver and associated hardware and then copies device-specific information needed by the driver to the PDEVICE structure pointed to by lpDevInfo. |
0x0001 | Copies the device driver information to the GDIINFO structure pointed to by lpDevInfo. |
0x8000 | Initializes the PDEVICE structure pointed to by lpDevInfo, but does not initialize the driver and peripheral hardware. |
0x8001 | Same as 0x0001. |
GDI sets the high order bit of wAction only if an application has requested an information context.
The export ordinal for this function is 5.
In some cases, GDI may request a raster device to write to a memory bitmap without enabling the device first. This occurs only with raster devices that can write to memory bitmaps.
GDI calls this function when it creates a device or information context for an application, or when it restores the context after Windows returns from a full-screen application.
For most devices, GDI calls Enable twice: first, to retrieve the driver's GDIINFO structure, and second, then to initialize the device and the PDEVICE structure.
DEVMODE, Disable, GDIINFO, PDEVICE