DrvEnableDriver

BOOL DrvEnableDriver(

IN ULONG iEngineVersion,
IN ULONG cj,
OUT DRVENABLEDATA *pded
);

DrvEnableDriver is the initial driver entry point exported by the driver DLL. It fills a DRVENABLEDATA structure with the driver version number and calling addresses of functions supported by the driver.

Parameters

iEngineVersion

Specifies the DDI version number that GDI was written for. This value was 0x00010000 for the first version of Windows NT. DDI_DRIVER_VERSION is always the current version; drivers should use this manifest constant, defined in winddi.h.

cj

Specifies the size, in bytes, in the DRVENABLEDATA structure. If the structure is larger than expected, extra members should be left unmodified.

pded

Points to a DRVENABLEDATA structure. GDI zero-initializes cj bytes before the call. The driver fills in its own data.

Return Value

The return value is TRUE if the specified driver is enabled. Otherwise, it is FALSE, and an error code is logged.

Comments

One-time initializations, such as allocating semaphores, can be performed by this function. The driver should wait until DrvEnablePDEV is called before enabling hardware, such as a display.

DrvEnableDriver is required for graphics drivers.

See Also

DrvDisableDriver, DRVENABLEDATA, DrvEnablePDEV, DRVFN