template <class character> bool get_printer_driver(handle printer, const character* environment, unsigned level, byte* information, unsigned size, unsigned* required)
This function obtains driver data for a printer.
The handle of the printer for which data is being requested.
const character* environment
A pointer to a string specifying the environment (for example, "windows NT x86" or "windows 4.0" etc). If null is specified, the environment of the calling application and client machine is used.
The level of information required. This may be 1, 2 or 3.
A pointer to a buffer to hold the driver information (depending on the level).
The size (in bytes) of the buffer provided by the previous parameter.
A pointer to a variable that is updated to contain the number of bytes copied to the buffer (when the function succeeds) and which contains the required buffer size when the function fails with an error signalling the buffer is too small.
|The function succeeded.
|The call failed.
The classes driver_information2 and driver_information3 contain the full path and filename of the printer driver. This may be used to load the printer driver (supplying the path and filename as the single parameter).