Using Win32 functions in Visual FoxPro Image Gallery
Printing and Print Spooler
..msdn
AddPort
AddPrinter
ClosePrinter
ConfigurePort
ConnectToPrinterDlg
DeletePort
DeviceCapabilities
DocumentProperties
EndDoc
EndPage
EnumForms
EnumJobs
EnumPorts
EnumPrinterData
EnumPrinterDrivers
EnumPrinters
EnumPrintProcessorDatatypes
EnumPrintProcessors
Escape
FindClosePrinterChangeNotification
FindFirstPrinterChangeNotification
FindNextPrinterChangeNotification
FreePrinterNotifyInfo
GetDefaultPrinter
GetPrinter
GetPrinterData
GetPrinterDriverDirectory
GetPrintProcessorDirectory
OpenPrinter
PrinterProperties
SetDefaultPrinter
SetJob
SetPrinter
StartDoc
StartPage
Code examples:
Enumerating printer drivers installed
EnumPrinterDrivers
    Add comment     W32 Constants      Translate this page
Enumerates the printer drivers installed on a specified printer server.
Code examples:
Enumerating printer drivers installed
Declaration:
BOOL EnumPrinterDrivers(
  LPTSTR pName,        // printer server name
  LPTSTR pEnvironment, // environment name
  DWORD Level,         // information level
  LPBYTE pDriverInfo,  // driver information buffer
  DWORD cbBuf,         // size of driver information buffer
  LPDWORD pcbNeeded,   // bytes received or required
  LPDWORD pcReturned   // number of drivers received
);
FoxPro declaration:
DECLARE INTEGER EnumPrinterDrivers IN winspool.drv;
    STRING    pName,;
    STRING    pEnvironment,;
    INTEGER   Level,;
    STRING  @ pDriverInfo,;
    INTEGER   cdBuf,;
    INTEGER @ pcbNeeded,;
    INTEGER @ pcReturned
Parameters:
pName
[in] Pointer to a null-terminated string that specifies the name of the server on which the printer drivers are enumerated.

pEnvironment
[in] Pointer to a null-terminated string that specifies the environment

Level
[in] Specifies the type of information structure returned in the pDriverInfo buffer.

pDriverInfo
[in] Pointer to a buffer that receives an array of DRIVER_INFO_* structures, as specified by Level.

cbBuf
[in] Specifies the size, in bytes, of the buffer pointed to by pDriverInfo.

pcbNeeded
[out] Pointer to a variable that receives the number of bytes copied to the pDriverInfo buffer if the function succeeds.

pcReturned
[out] Pointer to a variable that receives the number of structures returned in the pDriverInfo buffer.
Return value:
If the function succeeds, the return value is a nonzero value.
My comment:
Not like some other enumerating functions this one does not need a call-back procedure. It returns data in an array.
Word Index links for the EnumPrinterDrivers :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-08-01 12:00:00
Modified: 2001-11-26 16:02:48
Visited in last 7 days: 20
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.198.134.32)
12 sec.Example: 'Detecting changes in connections to removable drives (VFP9)'
23 sec.Example: 'Reading the structure of VFP main menu'
34 sec.Function: 'StartDoc'
Function group: 'Printing and Print Spooler'
44 sec.Function: 'FtpGetCurrentDirectory'
Function group: 'Internet Functions (WinInet)'
56 sec.Function: 'htons'
Function group: 'Windows Sockets 2 (Winsock)'
1.05 min.Function: 'GdipSetMatrixElements'
Function group: 'GDI+ Matrix'
1.3 min.Function: 'CeRegQueryInfoKey'
Function group: 'Remote Application Programming (RAPI)'
1.47 min.
1.65 min.Function: 'mixerSetControlDetails'
Function group: 'Windows Multimedia'
1.82 min.Example: 'Retrieving configuration information for the specified workstation (Win2000/XP)'
Google
Advertise here!