BOOL EnumForms(hPrinter, Level, pForm, cbBuf, pcbNeeded, pcReturned) | |||
HANDLE hPrinter; | |||
DWORD Level; | |||
LPBYTE pForm; | |||
DWORD cbBuf; | |||
LPDWORD pcbNeeded; | |||
LPDWORD pcReturned; |
This function enumerates the Forms that are supported by this Printer.
hPrinter
Indicates the open Printer handle that this function is to be performed upon. This Handle is obtained with the OpenPrinter function.
Level
This value must be 1.
pForm
This points to a buffer that will be filled with a FORM_INFO_1 structure.
cbBuf
A value specifying how large the buffer is pointed to by pForm.
pcbNeeded
This points to a variable that will be updated to contain the actual buffer size required that is pointed to by pForm. If cbBuf is too small then GetLastError will indicate ERROR_BUFFER_TOO_SMALL, and pcbNeeded will contain the size required. If cbBuf is large enough, then pcbNeeded will contain the number of bytes that were copied.
pcReturned
This points to a variable that will be updated to contain the no of FORM_INFO_1 structures returned in pForm.
The return value is TRUE if the function was successful, or FALSE if an error occurred. To obtain extended error information, use the GetLastError function.