Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The BindDevice method binds a printer to a bidi request. This method is similar to the OpenPrinter function.
Syntax
HRESULT BindDevice(
[in] const LPCWSTR pszDeviceName,
[in] const DWORD dwAccess
);
Parameters
[in] pszDeviceName
A pointer to a null-terminated string that contains name of the printer or print server. If NULL, it indicates the local printer server.
[in] dwAccess
The access privileges for the printer. This parameter can be one of the following values.
| Value | Description |
|---|---|
| BIDI_ACCESS_ADMINISTRATOR | Permits users to perform all administrative tasks and basic printing operations except for SYNCHRONIZE. This is the same as PRINTER_ALL_ACCESS in OpenPrinter. |
| BIDI_ACCESS_USER | Permits users to perform basic printing operations. This is the same as PRINTER_ACCESS_USE in OpenPrinter. |
Return value
The method returns one of the following values. For more information about COM error codes, see COM Error Codes.
| Value | Description |
|---|---|
| S_OK | The operation was successfully carried out. |
| E_HANDLE | The interface handle was invalid. |
| None of the above | The HRESULT contains an error code corresponding to the last error. |
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows XP |
| Minimum supported server | Windows Server 2003 |
| Target Platform | Desktop |
| Header | bidispl.h |
| DLL | Bidispl.dll |
See also
Bidirectional Communication Interfaces