Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can i know the driver name of a printer ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00767434
Message ID:
00767441
Vues:
13
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform