VpeSetDevice

<< Click to Display Table of Contents >>

Navigation:  Device Control Properties >

VpeSetDevice

Previous pageReturn to chapter overviewNext page

[Windows platform only; not supported by the Community Edition]

Set the current output device. After a new output device is successfully selected, all device settings (like DevPaperFormat(), etc.) are lost! You are also able to select the default output device by setting device to NULL or empty ("").

int VpeSetDevice(

VpeHandle hDoc,

LPCSTR device

)

VpeHandle hDoc

Document Handle

LPCSTR device

the name of the output device

Returns:

Value

Description

True

success

False

failure

Remarks:

In case of an error, LastError is set to VERR_COMMON. An error may occur in case the specified device is not present or not available for some reason.

 

You can enumerate the available devices with VpeDevEnum().

Example:

VpeSetDevice(hDoc, "Office Printer")

Selects the device installed as "Office Printer" in the system.

 

VpeSetDevice(hDoc, "") or VpeSetDevice(hDoc, NULL)

Selects the default device of the system.