 |
DeviceCapabilities ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The DeviceCapabilities function retrieves the capabilities of a printer device driver. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| 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: |
 |
|
 |
 |
| • |
 |
| Created: | 2002-12-30 16:48:30 | | Modified: | 2010-05-19 17:02:08 | Visited in last 7 days: 36 |