![]() ![]() Calling this function from a thread that manages interaction with the user interface could make the application appear to be unresponsive.ĮnumPrinterData retrieves printer configuration data set by the SetPrinterData function. ![]() WINDOWS API ENUMPRINTERSW DRIVERHow quickly this function returns depends on run-time factors such as network status, print server configuration, and printer driver implementation factors that are difficult to predict when writing an application. This is a blocking or synchronous function and might not return immediately. The function returns ERROR_NO_MORE_ITEMS when there are no more configuration data values to retrieve for a specified printer handle. ![]() ![]() If the function fails, the return value is a system error code. If the function succeeds, the return value is ERROR_SUCCESS. This parameter can be NULL if pData is NULL. When the function returns, the variable pointed to by pcbData will contain a buffer size that is large enough to successfully enumerate all of the printer's configuration data value names.Ī pointer to a variable that receives the number of bytes stored into the buffer pointed to by pData. If you want to have the operating system supply an adequate buffer size, set both this parameter and the cbValueName parameter to zero for the first call to EnumPrinterData for a specified printer handle. The size, in bytes, of the buffer pointed to by pData. This parameter can be NULL if the configuration data value is not required. WINDOWS API ENUMPRINTERSW CODEThe pType parameter can be NULL if the type code is not required.Ī pointer to a buffer that receives the configuration data value. For a list of the possible type codes, see Registry Value Types. When the function returns, the variable pointed to by pcbValueName will contain a buffer size that is large enough to successfully enumerate all of the printer's configuration data value names.Ī pointer to a variable that receives the number of bytes stored into the buffer pointed to by pValueName.Ī pointer to a variable that receives a code indicating the type of data stored in the specified value. If you want to have the operating system supply an adequate buffer size, set both this parameter and the cbData parameter to zero for the first call to EnumPrinterData for a specified printer handle. The size, in bytes, of the buffer pointed to by pValueName. This means that the EnumPrinterData function may return values in any order.Ī pointer to a buffer that receives the name of the configuration data value, including a terminating null character. Set dwIndex to zero in the next call to EnumPrinterData to start the actual enumeration process.Ĭonfiguration data values are not ordered. If you use the technique mentioned in the descriptions of the cbValueName and cbData parameters to obtain adequate buffer size values, setting both those parameters to zero in a first call to EnumPrinterData for a specified printer handle, the value of dwIndex does not matter for that call. See the following Remarks section for further information. Then increment the parameter by one for subsequent calls involving the same printer, until the function returns ERROR_NO_MORE_ITEMS. Set this parameter to zero for the first call to EnumPrinterData for a specified printer handle. Use the OpenPrinter or AddPrinter function to retrieve a printer handle.Īn index value that specifies the configuration data value to retrieve. Syntax DWORD EnumPrinterData(Ī handle to the printer whose configuration data is to be obtained. To retrieve the configuration data in a single call, use the EnumPrinterDataEx function. The EnumPrinterData function enumerates configuration data for a specified printer. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |