Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can i know the driver name of a printer ?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00767434
Message ID:
00767441
Views:
14
DECLARE INTEGER EnumPrinterDrivers IN winspool.drv;
	STRING pName, STRING pEnvironment, LONG Lvl, INTEGER pDrvInfo,;
	INTEGER cbBuf, INTEGER @pcbNeeded, INTEGER @pcReturned
This function returns DRIVER_INFO_ structures like the following:
typedef struct _DRIVER_INFO_2 {
DWORD cVersion;
LPTSTR pName;
LPTSTR pEnvironment;
LPTSTR pDriverPath;
LPTSTR pDataFile;
LPTSTR pConfigFile;
} DRIVER_INFO_2, *PDRIVER_INFO_2;

A typical return:
Version = 3
Driver name = Epson Stylus COLOR 660 ESC/P 2
Environment name = Windows NT x86
Driver path = C:\WINDOWS\System32\spool\DRIVERS\W32X86\3\UNIDRV.DLL
Driver data path = C:\WINDOWS\System32\spool\DRIVERS\W32X86\3\EPNDVE4A.GPD
Driver config = C:\WINDOWS\System32\spool\DRIVERS\W32X86\3\UNIDRVUI.DLL

MSDN description for this function:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_752r.asp

FoxPro code sample (membership):
http://www.news2news.com/vfp/?example=82&function=124
Previous
Reply
Map
View

Click here to load this message in the networking platform