Building a Printer Graphics DLL

When building a printer graphics DLL, you must be aware of the following differences between DLLs intended for user-mode execution and those intended for kernel-mode execution.

Note   In Windows Vista, printer graphics DLLs can only execute in user mode. For more information, see Choosing User Mode or Kernel Mode.

Rules for Building a Printer Graphics DLL

User-mode graphics DLLKernel-mode graphics DLL

Set TARGETTYPE=DYNLINK in source file.

Set TARGETTYPE=GDI_DRIVER in source file.

Preprocessor macro USERMODE_DRIVER must be defined in source files before winddi.h is included.

Preprocessor macro USERMODE_DRIVER must not be defined.

Object modules must be linked with the umpdddi.lib and gdi32.lib import libraries.

Object modules must be linked with the win32k.lib import library.

The DrvQueryDriverInfo function must return TRUE for DRVQUERY_USERMODE.

The DrvQueryDriverInfo function must return FALSE for DRVQUERY_USERMODE. (Alternatively, the function can be omitted.)

 

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft