Group: Printing and Print Spooler - Library: winspool.drv
Enumerating forms supported by a specified printer
BOOL EnumForms(
HANDLE hPrinter, // handle to printer object
DWORD Level, // data level
LPBYTE pForm, // form information buffer
DWORD cbBuf, // size of form information buffer
LPDWORD pcbNeeded, // bytes received or required
LPDWORD pcReturned // number of forms received
);
DECLARE INTEGER EnumForms IN winspool.drv;
INTEGER hPrinter,;
INTEGER lvl,;
INTEGER pForm,;
INTEGER cbBuf,;
INTEGER @ pcbNeeded,;
INTEGER @ pcReturned
hPrinter [in] Handle to the printer for which the forms should be enumerated.
Level [in] Specifies the version of the structure to which pForm points. This value must be 1.
pForm [out] Pointer to a FORM_INFO_1 structure.
cbBuf [in] Specifies the size, in bytes, of the buffer to which pForm points.
pcbNeeded [out] Pointer to a variable that receives the number of bytes copied to or the number of bytes required for the array to which pForm points.
pcReturned [out] Pointer to a variable that receives the number of FORM_INFO_1 structures copied into the array to which pForm points.
If the function succeeds, the return value is a nonzero value.