The BindDevice method binds a printer to a bidi request. This method is similar to the OpenPrinter function.
HRESULT BindDevice( const LPCWSTR pszDeviceName, const DWORD dwAccess );
A pointer to a null-terminated string that contains name of the printer or print server. If NULL, it indicates the local printer server.
The access privileges for the printer. This parameter can be one of the following values.
||Permits users to perform all administrative tasks and basic printing operations except for SYNCHRONIZE. This is the same as PRINTER_ALL_ACCESS in OpenPrinter.|
||Permits users to perform basic printing operations. This is the same as PRINTER_ACCESS_USE in OpenPrinter.|
The method returns one of the following values. For more information about COM error codes, see Error Handling.
||The operation was successfully carried out.|
||The interface handle was invalid.|
||The HRESULT contains an error code corresponding to the last error.|
|Minimum supported client||Windows XP|
|Minimum supported server||Windows Server 2003|