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:
Retrieving list of supported paper names (for example, Letter or Legal) for a given printer
DeviceCapabilities
..msdn    Add comment     W32 Constants      Translate this page
The DeviceCapabilities function retrieves the capabilities of a printer device driver.
Code examples:
Retrieving list of supported paper names (for example, Letter or Legal) for a given printer
Declaration:
DWORD DeviceCapabilities(
  LPCTSTR pDevice,         // printer name
  LPCTSTR pPort,           // port name
  WORD fwCapability,       // device capability
  LPTSTR pOutput,          // output buffer
  CONST DEVMODE *pDevMode  // device data buffer
);
FoxPro declaration:
DECLARE INTEGER DeviceCapabilities IN winspool.drv;
    STRING    pDevice,;
    STRING    pPort,;
    INTEGER   fwCapability,;
    STRING  @ pOutput,;
    INTEGER   pDevMode
Parameters:
pDevice
[in] Pointer to a null-terminated string that contains the name of the printer. Note that this is the name of the printer, not of the printer driver.

pPort
[in] Pointer to a null-terminated string that contains the name of the port to which the device is connected, such as LPT1.

fwCapability
[in] Specifies the capabilities to query. This parameter can be one of the predefined values.
pOutput
[out] Pointer to an array. The format of the array depends on the setting of the fwCapability parameter.

pDevMode
[in] Pointer to a DEVMODE structure.
Return value:
If the function fails, the return value is -1.
Usage:
cBuffer = REPLICATE(Chr(0), 0x4000)

nCount = DeviceCapabilities( m.cPrinterName, "LPT1",;
    DC_PAPERNAMES, @cBuffer, 0)
My comment:
See also: EnumForms, DocumentProperties
Word Index links for the DeviceCapabilities :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2002-12-30 16:48:30
Modified: 2010-05-19 17:02:08
Visited in last 7 days: 29
User Contributed Notes:
Boris K. | 2006-02-08 14:23:43
How can I calculate an offset for duplex flag and value in DEVMODE structure?

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 (23.20.86.177)
3 sec.
Function group: 'Mailslot'
6 sec.Function: 'GdipResetWorldTransform'
8 sec.Function: 'FtpGetCurrentDirectory'
11 sec.Function: 'htons'
14 sec.Function: 'IpReleaseAddress'
16 sec.Function: 'AVIStreamGetFrameOpen'
20 sec.Function: 'ControlService'
23 sec.Function: 'midiOutShortMsg'
26 sec.Function: 'AVIFileExit'
29 sec.Function: 'CeRapiUninit'
Google
Advertise here!