nsamine.blogg.se

Get printer driver by printer name vb net data
Get printer driver by printer name vb net data











Calling this function from a thread that manages interaction with the user interface could make the application appear to be unresponsive. How 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. If the function fails, the return value is zero.įor a non-existent driver, the function returns ERROR_UNKNOWN_PRINTER_DRIVER. If the function succeeds, the return value is a nonzero value. The size, in bytes, of the array at which pDriverInfo points.Ī pointer to a value that receives the number of bytes copied if the function succeeds or the number of bytes required if cbBuf is too small. GetPrinterDriver fails, GetLastError returns ERROR_INSUFFICIENT_BUFFER, and the pcbNeeded parameter returns the size, in bytes, of the buffer required to hold the array of structures and their data. To determine the required buffer size, call GetPrinterDriver with cbBuf set to zero. The buffer must be large enough to store the strings pointed to by the structure members. ValueĪ pointer to a buffer that receives a structure containing information about the driver, as specified by Level. This parameter can be one of the following values.

get printer driver by printer name vb net data get printer driver by printer name vb net data

The printer driver structure returned in the pDriverInfo buffer. If this parameter is NULL, the current environment of the calling application and client machine (not of the destination application and print server) is used. Use the OpenPrinter or AddPrinter function to retrieve a printer handle.Ī pointer to a null-terminated string that specifies the environment (for example, Windows x86, Windows IA64, or Windows 圆4).

get printer driver by printer name vb net data

Syntax BOOL GetPrinterDriver(Ī handle to the printer for which the driver data should be retrieved. If the driver is not installed on the local computer, GetPrinterDriver installs it. The GetPrinterDriver function retrieves driver data for the specified printer.













Get printer driver by printer name vb net data