EngSetPrinterData

DWORD EngSetPrinterData(

    IN HANDLE hPrinter,

    IN LPWSTR pType,

    IN DWORD dwType,

    IN LPBYTE lpbPrinterData,

    IN DWORD cjPrinterData

   );

EngSetPrinterData sets the configuration data for the specified printer.

Parameters

hPrinter
Handle that identifies the printer for which configuration data should be set. This is the handle that is passed as the hDriver parameter of DrvEnablePDEV.
pType
Pointer to a null-terminated string that specifies the type of data to be set.
dwType
Flag that specifies the type of information to be set. This parameter can be one of the following values:

Value

Meaning

REG_BINARY

Binary data in any form.

REG_DWORD

A 32-bit number.

REG_DWORD_LITTLE_ENDIAN

A 32-bit number in little-endian format (same as REG_DWORD), meaning that the most significant byte of a word is the high-order byte

REG_DWORD_BIG_ENDIAN

A 32-bit number in big-endian format, meaning that the most significant byte of a word is the low-order byte.

REG_EXPAND_SZ

A null-terminated string that contains unexpanded references to environment variables (for example, “%PATH%”). It will be a UNICODE or ANSI string depending on whether UNICODE or ANSI functions are used.

REG_LINK

A UNICODE symbolic link.

REG_MULTI_SZ

An array of null-terminated strings, terminated by two null characters.

REG_NONE

No defined value type.

REG_RESOURCE_LIST

A device-driver resource list.

REG_SZ

A null-terminated string. It will be a UNICODE or ANSI string depending on whether you use the UNICODE or ANSI functions.

lpbPrinterData
Byte pointer to the printer configuration data that is to be set. The type of data pointed to is determined by dwType.
cjPrinterData
Specifies the size, in bytes, of lpbPrinterData.

Return Value

EngSetPrinterData returns the last logged error message.

See Also

DrvEnablePDEV, EngGetPrinterData