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:
Using EnumPrinters function to enumerate locally installed printers
EnumPrinters
..msdn    Add comment     W32 Constants      Translate this page
The EnumPrinters function enumerates available printers, print servers, domains, or print providers.
Code examples:
Using EnumPrinters function to enumerate locally installed printers
Declaration:
BOOL EnumPrinters(
  DWORD Flags,         // printer object types
  LPTSTR Name,         // name of printer object
  DWORD Level,         // information level
  LPBYTE pPrinterEnum, // printer information buffer
  DWORD cbBuf,         // size of printer information buffer
  LPDWORD pcbNeeded,   // bytes received or required
  LPDWORD pcReturned   // number of printers enumerated
);
FoxPro declaration:
DECLARE INTEGER EnumPrinters IN winspool.drv;
    INTEGER   Flags,;
    INTEGER   Name,;
    INTEGER   Level,;
    STRING  @ pPrinterEnum,;
    INTEGER   cbBuf,;
    INTEGER @ pcbNeeded,;
    INTEGER @ pcReturned
Parameters:
Flags
[in] Specifies the types of print objects that the function should enumerate.

Name
A pointer to a null-terminated string or NULL.

Level
[in] Specifies the type of data structures pointed to by pPrinterEnum. Valid values are 1, 2, 4, and 5, which correspond to the PRINTER_INFO_1, PRINTER_INFO_2, PRINTER_INFO_4, and PRINTER_INFO_5 data structures.

pPrinterEnum
[out] Pointer to a buffer that receives an array of PRINTER_INFO_1, PRINTER_INFO_2, PRINTER_INFO_4, or PRINTER_INFO_5 structures.

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

pcbNeeded
[out] 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.

pcReturned
[out] Pointer to a value that receives the number of structures that the function returns in the array to which pPrinterEnum points.
Return value:
If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero.
Word Index links for the EnumPrinters :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-09-14 12:00:00
Modified: 2001-11-26 16:03:38
Visited in last 7 days: 39
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.226.34.209)
12 sec.Function: 'AVIFileInfo'
25 sec.Function: 'GdipGetDpiY'
37 sec.Function: 'waveOutPrepareHeader'
51 sec.Function: 'RegOpenKeyEx'
1.07 min.Function: 'AVIStreamGetFrameClose'
1.28 min.Function: 'StrCmpC'
1.52 min.Function: 'DragQueryFile'
1.7 min.Function: 'DrawText'
1.92 min.Function: 'AddPort'
2.13 min.Function: 'SetPrinter'
Google
Advertise here!