Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
DevQueryHardcopyCaps (1.2)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_DEV
LONG DevQueryHardcopyCaps(hdc, iStartForm, cForms, phci)
HDC hdc; /* device-context handle */
LONG iStartForm; /* index of forms code to start from */
LONG cForms; /* number of forms to query */
PHCINFO phci; /* pointer to buffer for results */
The DevQueryHardcopyCaps function returns information about the hardcopy
capabilities of a device.
You can use the iStartForm and cForms parameters together to enumerate all
available form codes without having to allocate a buffer large enough to
hold information on them all.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hdc Identifies the device context.
iStartForm Specifies the index of the form code from which to start the
query. The first forms code is specified by the value 0.
cForms Specifies the number of forms to query.
phci Points to the buffer that contains the results of the query. The
result consists of cForms copies of the HCINFO structure.
Return Value
If there are five form codes defined and the iStartForm parameter is 2 and
the cForms parameter is 3, a query is performed for form codes 2, 3, and 4
and the result is returned in the buffer pointed to by the phci parameter.
The return value, if cForms is zero, is the number of available forms or, if
cForms is nonzero, the number of forms returned. The return value is
DQHC_ERROR if an error occurs.
Errors
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
PMERR_INV_FORMS_CODE
PMERR_INV_HDC
PMERR_INV_LENGTH_OR_COUNT
See Also
HCINFO
♦