DrvSplDeviceCaps function
A printer interface DLL's DrvSplDeviceCaps function queries a printer for its capabilities.
Syntax
DWORD DrvSplDeviceCaps( HANDLE hPrinter, _In_ PWSTR pwDeviceName, WORD DeviceCap, _Out_opt_ PVOID pvOutput, DWORD cchBuf, _In_opt_ PDEVMODE pDM );
Parameters
- hPrinter
-
Caller-supplied handle to the printer.
- pwDeviceName [in]
-
Caller-supplied pointer to a Unicode string that contains the printer name.
- DeviceCap
-
Caller-supplied bit flag that indicates the capability to query for. (The flags are defined in header file wingdi.h.) This function is not required to support all of the DC_XXX flags, but it must support those listed in the following table.
Flag Definition DC_MEDIAREADY
The pvOutput parameter points to a buffer that the function should fill with an array of string buffers, each 64 characters in length. Each array element should contain a NULL-terminated string representing a name for a paper form that is available for use.
The function's return value should be the number of elements in the returned array.
If pvOutput is NULL, the function should just return the number of array elements required.
DC_PAPERNAMES
The pvOutput parameter points to a buffer that the function should fill with an array of string buffers, each 64 characters in length. Each array element should contain a NULL-terminated string representing a name for a paper form.
The function's return value should be the number of elements in the returned array.
If pvOutput is NULL, the function should just return the number of array elements required.
- pvOutput [out, optional]
-
Caller-supplied pointer to a buffer that receives function-supplied information. The buffer's use depends on the value of the DeviceCap parameter. The caller is responsible for allocating and freeing this buffer.
- cchBuf
-
Caller-supplied size (in characters) of the buffer pointed to by the pvOutput parameter.
- pDM [in, optional]
-
Caller-supplied pointer to a DEVMODEW structure that describes the current print job characteristics. If NULL, the function should use the driver's internal default DEVMODEW structure.
Return value
The return value depends on the DeviceCap parameter. If DeviceCap indicates a capability that the driver does not support, or if an error is encountered, the function should return GDI_ERROR.
Remarks
The DrvSplDeviceCaps function is available in Microsoft Windows Server 2003 and later.
For descriptions of the DC_XXX flags, see DrvDeviceCapabilities.
This function must be defined in the .def file as DrvSplDeviceCaps @ 254, because the spooler uses the ordinal number 254 to obtain the driver function pointer.
Requirements
|
Header |
|
|---|
See also
Send comments about this topic to Microsoft
Build date: 11/28/2012
