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:
Adding printer to the list of supported printers for the specified server
AddPrinter
..msdn    Add comment     W32 Constants      Translate this page
The AddPrinter function adds a printer to the list of supported printers for a specified server.
Code examples:
Adding printer to the list of supported printers for the specified server
Declaration:
HANDLE AddPrinter(
  LPTSTR pName,     // server name
  DWORD Level,      // printer information level
  LPBYTE pPrinter   // printer information buffer
);
FoxPro declaration:
DECLARE INTEGER AddPrinter IN winspool.drv;
    STRING    pName,;
    INTEGER   Level,;
    STRING  @ pPrinter

Parameters:
pName
[in] Pointer to a null-terminated string that specifies the name of the server on which the printer should be installed.

Level
[in] Specifies the version of the structure to which pPrinter points. This value must be 2.

pPrinter
[in] Pointer to a PRINTER_INFO_2 structure that contains information about the printer.
Return value:
If the function succeeds, the return value is the handle to a new printer object.
My comment:
When you are finished with the handle, pass it to the ClosePrinter function to close it.

Use the EnumPrintProcessors function to enumerate the set of print processors installed on a server. Use the EnumPrintProcessorDatatypes function to enumerate the set of data types that a print processor supports. Use the EnumPorts function to enumerate the set of available ports. Use the EnumPrinterDrivers function to enumerate the installed printer drivers.
Word Index links for the AddPrinter :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2002-08-16 09:26:08
Modified: 2002-08-16 09:28:48
Visited in last 7 days: 36
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.162.166.214)
10 sec.Function: 'CeRegQueryInfoKey'
Function group: 'Remote Application Programming (RAPI)'
19 sec.Function: 'ReadDirectoryChangesW'
Function group: 'File Management'
27 sec.Function: 'GetEnvironmentStrings'
37 sec.Function: 'CeGetLastError'
Function group: 'Remote Application Programming (RAPI)'
46 sec.Function: 'SetFocus'
58 sec.
Function group: 'Color'
1.15 min.Function: 'CeCreateDirectory'
Function group: 'Remote Application Programming (RAPI)'
1.35 min.Function: 'GetACP'
1.52 min.
Function group: 'GDI+ Pen'
1.68 min.Function: 'TerminateProcess'
Function group: 'Process and Thread'
Google
Advertise here!