please dont rip this site Prev Next

SetPrinterData info  Overview  Group

The SetPrinterData function sets the configuration data for a printer.

DWORD SetPrinterData(

    HANDLE hPrinter,

// handle of printer object

    LPTSTR pValueName,

// address of data type

    DWORD Type,

// flag for value type

    LPBYTE pData,

// address of array that specifies printer data

    DWORD cbData 

// size, in bytes, of array

   );

Parameters

hPrinter
Identifies the printer for which the configuration data should be set.
pValueName
Points to a null-terminated string that specifies the type of data to be set.
Type
Specifies the type of information to be stored as the value’s data. 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. This is equivalent to REG_DWORD.

In little-endian format, a multi-byte value is stored in memory from the lowest byte (the “little end”) to the highest byte. For example, the value 0x12345678 is stored as (0x78 0x56 0x34 0x12) in little-endian format.

Windows NT and Windows 95 are designed to run on little-endian computer architectures. A user may connect to computers that have big-endian architectures, such as some UNIX systems.

REG_DWORD_BIG_ENDIAN

A 32-bit number in big-endian format.

In big-endian format, a multi-byte value is stored in memory from the highest byte (the “big end”) to the lowest byte. For example, the value 0x12345678 is stored as (0x12 0x34 0x56 0x78) in big-endian format.

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 you use the Unicode or ANSI functions.

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.

pData
Points to an array of bytes that contains the printer configuration data.
cbData
Specifies the size, in bytes, of the array.

Return Values

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is an error value. To get extended error information, call GetLastError.

Remarks

The handle hPrinter is obtained by calling the OpenPrinter function.

Existing configuration data for a printer can be retrieved by calling the GetPrinter function.

See Also

GetPrinter, GetPrinterData, OpenPrinter 


file: /Techref/os/win/api/win32/func/src/f80_19.htm, 6KB, , updated: 2000/4/7 11:19, local time: 2024/11/24 12:57,
TOP NEW HELP FIND: 
18.119.122.69:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://techref.massmind.org/techref/os/win/api/win32/func/src/f80_19.htm"> SetPrinterData</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to techref.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .