![]() |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function is used to obtain information about printers, such as the name of the printer or whether the printer can print in color.
DWORD WINAPI GetPrinterInfo( HANDLE hPrint, DWORD dwOption, PVOID pBuff, PDWORD pBuffLen );
Parameters
Value | Description |
---|---|
PRINTER_ID | Retrieves the name of the printer. The pBuffparameter must point to a string previously allocated by the calling application. If pBuffis NULL, this function returns ERROR_SUCCESS, and pBuffLencontains the number of characters needed to store the printer name, including the terminating null character. If pBuffLenis NULL, this function returns ERROR_INVALID_PARAMETER. If pBuffLenis not long enough to hold the name of the printer, this function returns ERROR_MORE_DATA along with the correct number of characters needed, including the terminating null character in pBuffLen. |
PRINTER_PEN | Retrieves the color or black-and-white capabilities of the ink cartridge currently in an InkJet printer. The pBuffparameter points to a DWORDcontaining one of the values PEN_BLACK or PEN_COLOR. These values are declared in the Prnport.h header file. |
Return values
ERROR_SUCCESS indicates success. One of the following values indicates failure:
Remarks
In Windows CE 2.10, This function supports only printers that connect by means of the parallel port.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 2.10 and later |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
Last updated on Tuesday, July 13, 2004