网站首页  词典首页

请输入您要查询的函数:

 

术语 devicecapabilities
释义 DeviceCapabilities
语法:
DWORD DeviceCapabilities(
__in LPCTSTR pDevice,
__in LPCTSTR pPort,
__in WORD fwCapability,
__out LPTSTR pOutput,
__in const DEVMODE *pDevMode
);
DeviceCapabilities功能
在DeviceCapabilities函数检索的打印机设备驱动程序的功能。
参数
pDevice [in]
以甲空指针结尾的字符串,其中包含的打印机的名称。请注意,这是打印机的名称,而不是打印机驱动程序。
支持度 [in]
一个指向 null 结尾的字符串指针,其中包含了该设备的连接端口例如LPT1,名称。
fwCapability [in]
的能力质疑。此参数可以是下列值之一。
ValueMeaning
DC_BINNAMESRetrieves的名称打印机的文件箱。在pOutput缓冲区接收缓冲区的字符串数组。每个字符串缓冲区为24个字符,包含本文件的名称。返回值表示条目的个数。这个名字的字符串是空终止,除非该名称是24个字符长。如果pOutput为NULL,则返回值就是本项目的数量要求。
DC_BINSRetrieves列表可用纸张的回收箱。接收缓冲区的pOutput一个字值,表明了现有的打印机纸张来源数组。返回值表示条目的个数。对于可能的数组值的列表,见DEVMODE结构dmDefaultSource成员的说明。如果pOutput为NULL,则返回值表示数组中的所需数量的条目。
DC_COLLATEIf打印机支持,整理,返回值是1,否则,返回值是零。该pOutput参数不使用。
DC_COLORDEVICEIf打印机支持彩色打印,返回值为1,否则,返回值是零。该pOutput参数不使用。
DC_COPIESReturns的份数设备可以打印。
DC_DRIVERReturns打印机的驱动程序的版本号。
DC_DUPLEXIf打印机支持双面打印,返回值为1,否则,返回值是零。该pOutput参数不使用。
DC_ENUMRESOLUTIONSRetrieves的名单由打印机支持的决议。接收缓冲区的pOutput一个长期值的数组。对于每个支持的决议,该数组包含了长值对指定的x和第Y尺寸,以每英寸点数。返回值表示支持的决议。如果pOutput为NULL,则返回值表示支持的决议。
DC_EXTRAReturns有多少人因设备所需字节的打印机的驱动程序DEVMODE结构的特定部分。
DC_FIELDSReturns的打印机驱动程序的DEVMODE结构dmFields成员。在dmFields成员表明了该装置的成员结构独立的一部分是由打印机驱动程序支持。
DC_FILEDEPENDENCIESRetrieves的名称的任何需要加载驱动程序时,安装其他文件。缓冲器接收的pOutput字符串缓冲区的数组。每个字符串缓冲区是64个字符,包含一个文件名。返回值表示条目的个数。这个名字的字符串是空终止,除非该名称是64个字符长。如果pOutput为NULL,则返回值是文件的数量。
DC_MAXEXTENTReturns最大纸张大小的打印机驱动程序的DEVMODE结构dmPaperLength和dmPaperWidth成员可以指定。在返回值LOWORD包含最高dmPaperWidth值,HIWORD包含最大dmPaperLength价值。
DC_MEDIAREADYRetrieves的名称的文件形式,目前可供使用。在pOutput缓冲区接收缓冲区的字符串数组。每个字符串缓冲区为64个字符长,包含的文件形式的名称。返回值表示条目的个数。这个名字的字符串是空终止,除非该名称是64个字符长。如果pOutput为NULL,则返回值是纸张形式的数量。
DC_MEDIATYPENAMESRetrieves的姓名支持的媒体类型。在pOutput缓冲区接收缓冲区的字符串数组。每个字符串缓冲区是64个字符,包含一个支持的媒体类型的名称。返回值表示条目的个数。字符串是空终止,除非该名称是64个字符长。如果pOutput为NULL,则返回值是媒体类型名的电话号码。
Windows 2000中:这个标志是不支持。
DC_MEDIATYPESRetrieves列表支持的媒体类型。在pOutput缓冲区收到的DWORD值,表明了支持的媒体类型的数组。返回值表示条目的个数。对于可能的数组值的列表,见DEVMODE结构dmMediaType成员的说明。如果pOutput为NULL,则返回值表示数组中的所需数量的条目。
Windows 2000中:这个标志是不支持。
DC_MINEXTENTReturns最小纸张大小的打印机驱动程序的DEVMODE结构dmPaperLength和dmPaperWidth成员可以指定。在返回值LOWORD包含的最低dmPaperWidth值,HIWORD包含的最低dmPaperLength价值。
DC_ORIENTATIONReturns为设备之间的纵向和横向关系符合学位数目,即纵向方向逆时针旋转产生横向。返回值可以是下列之一:
0No横向。
90Portrait是90度旋转,产生景观。
270Portrait旋转270度,生产加工。

DC_NUPRetrieves整数的数组指示该打印机的打印能力为打印的页面多页的文件。接收缓冲区的pOutput一个DWORD值的数组。每个值代表了每打印一页文件的页数支持的数量。返回值表示条目的个数。如果pOutput为NULL,则返回值表示数组中的所需数量的条目。
DC_PAPERNAMESRetrieves支持的列表(例如文件名称,字母或法律)。在pOutput缓冲区接收缓冲区的字符串数组。每个字符串缓冲区为64个字符长,包含的文件形式的名称。返回值表示条目的个数。这个名字的字符串是空终止,除非该名称是64个字符长。如果pOutput为NULL,则返回值是纸张形式的数量。
DC_PAPERSRetrieves列表支持的纸张大小。接收缓冲区的pOutput一个字值,表明了现有的打印机纸张大小的数组。返回值表示条目的个数。对于可能的数组值的列表,见DEVMODE结构dmPaperSize成员的说明。如果pOutput为NULL,则返回值表示数组中的所需数量的条目。
DC_PAPERSIZERetrieves的尺寸在一毫米的十分之一,每个受支持的纸张大小。在pOutput缓冲区收到Point结构的数组。每个结构包含一个纸张大小宽度(X度)和长度(运维),犹如该文件是在DMORIENT_PORTRAIT方向。返回值表示条目的个数。
DC_PERSONALITYRetrieves打印机的列表描述打印机支持的语言。在pOutput缓冲区接收缓冲区的字符串数组。每个缓冲区为32个字符长,包含的打印机描述语言的名称。返回值表示条目的个数。这个名字的字符串是空终止,除非该名称是32个字符。如果pOutput为NULL,则返回值表示数组项规定数目。
DC_PRINTERMEMThe返回值是可用的打印机内存的数量以千字节。该pOutput参数不使用。
DC_PRINTRATEThe返回值表示打印机的打印速度。返回值为DC_PRINTRATEUNIT表明了DC_PRINTRATE价值的单位。该pOutput参数不使用。
DC_PRINTRATEPPMThe返回值表示打印机的打印速度每分钟页。该pOutput参数不使用。
DC_PRINTRATEUNITThe返回值为下列值指示为标志的DC_PRINTRATE返回的值打印速度的单位之一。该pOutput参数不使用。
PRINTRATEUNIT_CPSCharacters每秒。
PRINTRATEUNIT_IPMInches每分钟。
PRINTRATEUNIT_LPMLines每分钟。
PRINTRATEUNIT_PPMPages每分钟。

DC_SIZEReturns的打印机驱动程序的DEVMODE结构dmSize成员。
DC_STAPLEIf打印机支持装订,返回值是一个非零值,否则,返回值是零。该pOutput参数不使用。
DC_TRUETYPERetrieves驱动程序的能力,为使用TrueType字体。对于DC_TRUETYPE的pOutput参数应为NULL。返回值可以是一个或多个以下:
DCTT_BITMAPDevice可以打印TrueType字体作为图形。
DCTT_DOWNLOADDevice可以降低负荷TrueType字体。
DCTT_SUBDEVDevice可以替代设备字体TrueType字体。

DC_VERSIONReturns规范版本的打印机驱动程序符合。
pOutput [out]
对一个数组的指针。数组的格式取决于该fwCapability参数设置。如果pOutput为NULL,DeviceCapabilities返回的输出数据所需的字节数。
pDevMode [in]
一个DEVMODE结构的指针。如果该参数为NULL,DeviceCapabilities检索指定的打印机驱动程序当前默认初始值。否则,该函数检索的结构中包含的值的pDevMode点。
返回值
如果函数成功,返回值取决于对fwCapability参数设置。甲返回值为零普遍表示,虽然成功完成的功能,有一些类型的故障,如不支持的能力。有关详细信息,见fwCapability值的描述。
如果该函数返回-1,这可能意味着,要么能力不支持或有一般功能衰竭。
备注
DEVMODE结构指出了pDevMode参数,可通过调用DocumentProperties函数获得。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryWinspool.lib
Unicode和ANSI namesDeviceCapabilitiesW(Unicode)和DeviceCapabilitiesA(ANSI)的
参见
Printing and Print Spooler Overview
Printing and Print Spooler 函数
的DEVMODE
DOCINFO
DocumentProperties
GetDeviceCaps
调用GetProcAddress
调用LoadLibrary

StartDoc
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==DeviceCapabilities Function
The DeviceCapabilities function retrieves the capabilities of a printer device driver.
Syntax
DWORD DeviceCapabilities(
__in LPCTSTR pDevice,
__in LPCTSTR pPort,
__in WORD fwCapability,
__out LPTSTR pOutput,
__in const DEVMODE *pDevMode
);
Parameters
pDevice [in]
A 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]
A pointer to a null-terminated string that contains the name of the port to which the device is connected, such as LPT1.
fwCapability [in]
The capabilities to be queried. This parameter can be one of the following values.
ValueMeaning
DC_BINNAMESRetrieves the names of the printer's paper bins. The pOutput buffer receives an array of string buffers. Each string buffer is 24 characters long and contains the name of a paper bin. The return value indicates the number of entries in the array. The name strings are null-terminated unless the name is 24 characters long. If pOutput is NULL, the return value is the number of bin entries required.
DC_BINSRetrieves a list of available paper bins. The pOutput buffer receives an array of WORD values that indicate the available paper sources for the printer. The return value indicates the number of entries in the array. For a list of the possible array values, see the description of the dmDefaultSource member of the DEVMODE structure. If pOutput is NULL, the return value indicates the required number of entries in the array.
DC_COLLATEIf the printer supports collating, the return value is 1; otherwise, the return value is zero. The pOutput parameter is not used.
DC_COLORDEVICEIf the printer supports color printing, the return value is 1; otherwise, the return value is zero. The pOutput parameter is not used.
DC_COPIESReturns the number of copies the device can print.
DC_DRIVERReturns the version number of the printer driver.
DC_DUPLEXIf the printer supports duplex printing, the return value is 1; otherwise, the return value is zero. The pOutput parameter is not used.
DC_ENUMRESOLUTIONSRetrieves a list of the resolutions supported by the printer. The pOutput buffer receives an array of LONG values. For each supported resolution, the array contains a pair of LONG values that specify the x and y dimensions of the resolution, in dots per inch. The return value indicates the number of supported resolutions. If pOutput is NULL, the return value indicates the number of supported resolutions.
DC_EXTRAReturns the number of bytes required for the device-specific portion of the DEVMODE structure for the printer driver.
DC_FIELDSReturns the dmFields member of the printer driver's DEVMODE structure. The dmFields member indicates which members in the device-independent portion of the structure are supported by the printer driver.
DC_FILEDEPENDENCIESRetrieves the names of any additional files that need to be loaded when a driver is installed. The pOutput buffer receives an array of string buffers. Each string buffer is 64 characters long and contains the name of a file. The return value indicates the number of entries in the array. The name strings are null-terminated unless the name is 64 characters long. If pOutput is NULL, the return value is the number of files.
DC_MAXEXTENTReturns the maximum paper size that the dmPaperLength and dmPaperWidth members of the printer driver's DEVMODE structure can specify. The LOWORD of the return value contains the maximum dmPaperWidth value, and the HIWORD contains the maximum dmPaperLength value.
DC_MEDIAREADYRetrieves the names of the paper forms that are currently available for use. The pOutput buffer receives an array of string buffers. Each string buffer is 64 characters long and contains the name of a paper form. The return value indicates the number of entries in the array. The name strings are null-terminated unless the name is 64 characters long. If pOutput is NULL, the return value is the number of paper forms.
DC_MEDIATYPENAMESRetrieves the names of the supported media types. The pOutput buffer receives an array of string buffers. Each string buffer is 64 characters long and contains the name of a supported media type. The return value indicates the number of entries in the array. The strings are null-terminated unless the name is 64 characters long. If pOutput is NULL, the return value is the number of media type names required.
Windows 2000: This flag is not supported.
DC_MEDIATYPESRetrieves a list of supported media types. The pOutput buffer receives an array of DWORD values that indicate the supported media types. The return value indicates the number of entries in the array. For a list of possible array values, see the description of the dmMediaType member of the DEVMODE structure. If pOutput is NULL, the return value indicates the required number of entries in the array.
Windows 2000: This flag is not supported.
DC_MINEXTENTReturns the minimum paper size that the dmPaperLength and dmPaperWidth members of the printer driver's DEVMODE structure can specify. The LOWORD of the return value contains the minimum dmPaperWidth value, and the HIWORD contains the minimum dmPaperLength value.
DC_ORIENTATIONReturns the relationship between portrait and landscape orientations for a device, in terms of the number of degrees that portrait orientation is rotated counterclockwise to produce landscape orientation. The return value can be one of the following:
0No landscape orientation.
90Portrait is rotated 90 degrees to produce landscape.
270Portrait is rotated 270 degrees to produce landscape.

DC_NUPRetrieves an array of integers that indicate that printer's ability to print multiple document pages per printed page. The pOutput buffer receives an array of DWORD values. Each value represents a supported number of document pages per printed page. The return value indicates the number of entries in the array. If pOutput is NULL, the return value indicates the required number of entries in the array.
DC_PAPERNAMESRetrieves a list of supported paper names (for example, Letter or Legal). The pOutput buffer receives an array of string buffers. Each string buffer is 64 characters long and contains the name of a paper form. The return value indicates the number of entries in the array. The name strings are null-terminated unless the name is 64 characters long. If pOutput is NULL, the return value is the number of paper forms.
DC_PAPERSRetrieves a list of supported paper sizes. The pOutput buffer receives an array of WORD values that indicate the available paper sizes for the printer. The return value indicates the number of entries in the array. For a list of the possible array values, see the description of the dmPaperSize member of the DEVMODE structure. If pOutput is NULL, the return value indicates the required number of entries in the array.
DC_PAPERSIZERetrieves the dimensions, in tenths of a millimeter, of each supported paper size. The pOutput buffer receives an array of POINT structures. Each structure contains the width (x-dimension) and length (y-dimension) of a paper size as if the paper were in the DMORIENT_PORTRAIT orientation. The return value indicates the number of entries in the array.
DC_PERSONALITYRetrieves a list of printer description languages supported by the printer. The pOutput buffer receives an array of string buffers. Each buffer is 32 characters long and contains the name of a printer description language. The return value indicates the number of entries in the array. The name strings are null-terminated unless the name is 32 characters long. If pOutput is NULL, the return value indicates the required number of array entries.
DC_PRINTERMEMThe return value is the amount of available printer memory, in kilobytes. The pOutput parameter is not used.
DC_PRINTRATEThe return value indicates the printer's print rate. The value returned for DC_PRINTRATEUNIT indicates the units of the DC_PRINTRATE value. The pOutput parameter is not used.
DC_PRINTRATEPPMThe return value indicates the printer's print rate, in pages per minute. The pOutput parameter is not used.
DC_PRINTRATEUNITThe return value is one of the following values that indicate the print rate units for the value returned for the DC_PRINTRATE flag. The pOutput parameter is not used.
PRINTRATEUNIT_CPSCharacters per second.
PRINTRATEUNIT_IPMInches per minute.
PRINTRATEUNIT_LPMLines per minute.
PRINTRATEUNIT_PPMPages per minute.

DC_SIZEReturns the dmSize member of the printer driver's DEVMODE structure.
DC_STAPLEIf the printer supports stapling, the return value is a nonzero value; otherwise, the return value is zero. The pOutput parameter is not used.
DC_TRUETYPERetrieves the abilities of the driver to use TrueType fonts. For DC_TRUETYPE, the pOutput parameter should be NULL. The return value can be one or more of the following:
DCTT_BITMAPDevice can print TrueType fonts as graphics.
DCTT_DOWNLOADDevice can down-load TrueType fonts.
DCTT_SUBDEVDevice can substitute device fonts for TrueType fonts.

DC_VERSIONReturns the specification version to which the printer driver conforms.

pOutput [out]
A pointer to an array. The format of the array depends on the setting of the fwCapability parameter. If pOutput is NULL, DeviceCapabilities returns the number of bytes required for the output data.
pDevMode [in]
A pointer to a DEVMODE structure. If this parameter is NULL, DeviceCapabilities retrieves the current default initialization values for the specified printer driver. Otherwise, the function retrieves the values contained in the structure to which pDevMode points.
Return Value
If the function succeeds, the return value depends on the setting of the fwCapability parameter. A return value of zero generally indicates that, while the function completed successfully, there was some type of failure, such as a capability that is not supported. For more details, see the descriptions for the fwCapability values.
If the function returns -1, this may mean either that the capability is not supported or there was a general function failure.
Remarks
The DEVMODE structure pointed to by the pDevMode parameter may be obtained by calling the DocumentProperties function.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryWinspool.lib
Unicode and ANSI namesDeviceCapabilitiesW (Unicode) and DeviceCapabilitiesA (ANSI)
See Also
Printing and Print Spooler Overview
Printing and Print Spooler Functions
DEVMODE
DOCINFO
DocumentProperties
GetDeviceCaps
GetProcAddress
LoadLibrary
POINT
StartDoc
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd183552(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:25:58