PrinterOpen

Opens a specified printer port and returns a handle to the printer.

Syntax

HANDLE WINAPI PrinterOpen( PWSTR sPort );

Parameters

sPort
Pointer to a string that exactly matches any one of the strings listed in the HKEY_LOCAL_MACHINE\Printers\Ports registry key.

Return Values

A handle to the printer indicates success.