PrApi: UseDevice

UseDevice

Opens a PR device.

 Public Function UseDevice(
	  ByRef device As String,
	  ByVal mode As Long ) As Boolean

Parameters

device
The name of the device to open. It can be NULL. In this case the first available device is opened.
mode
The opening mode. Check the PR_USAGEMODE parameters for more information.

Return Values

On error false is returned and the error code and string of the control is set appropriately.

Languages

[Visual Basic] Public Function UseDevice(ByRef device As String, ByVal mode As Long) As Boolean

[Delphi] function UseDevice(var device: WideString; mode: Integer): Boolean;

[C++] bool UseDevice(BSTR * device, long mode);

Remarks

See Also

Class PrApi Overview PrApi Properties PrApi Methods UDNumberOfBlocks UseDeviceN