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 ports that are available for printing on a specified server
AddPort
..msdn    Add comment     W32 Constants      Translate this page
Adds the name of a port to the list of supported ports. The AddPort function is exported by the port monitor.
Code examples:
Enumerating ports that are available for printing on a specified server
Declaration:
BOOL AddPort(
    LPTSTR pName,         // server name
    HWND hWnd,            // handle to parent window
    LPTSTR pMonitorName   // monitor name
);
FoxPro declaration:
DECLARE INTEGER AddPort IN winspool.drv;
    STRING pName,;
    INTEGER hWindow,;
    STRING pMonitorName

Parameters:
pName
[in] Pointer to a zero-terminated string that specifies the name of the server to which the port is connected. If this parameter is NULL, the port is local.

hWnd
[in] Handle to the parent window of the AddPort dialog box.

pMonitorName
[in] Pointer to a zero-terminated string that specifies the monitor associated with the port.
Return value:
If the function succeeds, the return value is a nonzero value.
My comment:
The AddPort function browses the network to find existing ports, and displays a dialog box for the user. The AddPort function should validate the port name entered by the user by calling EnumPorts to ensure that no duplicate names exist.

The caller of the AddPort function must have SERVER_ACCESS_ADMINISTER access to the server to which the port is connected.

See also: DeletePort, EnumPorts.
Word Index links for the AddPort :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2005-09-22 12:33:48
Modified: 2005-09-22 12:35:49
Visited in last 7 days: 19
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.145.124.143)
1 sec.Function: 'AVIFileGetStream'
Function group: 'Windows Multimedia'
2 sec.Links
4 sec.Function: 'SQLNativeSql'
Function group: 'ODBC API'
6 sec.
8 sec.Function: 'CryptExportKey'
Function group: 'Cryptography Reference'
9 sec.Login
11 sec.Function: 'CryptHashData'
Function group: 'Cryptography Reference'
12 sec.Function: 'CreateProcessWithLogonW'
Function group: 'Process and Thread'
14 sec.Function: 'CeRegEnumValue'
Function group: 'Remote Application Programming (RAPI)'
15 sec.Function: 'DrawDibOpen'
Function group: 'Windows Multimedia'
Google
Advertise here!