The input value in the cbOut member is not necessarily equal to the size of the buffer pointed to by the pdmOut member. For example, when the pPSUInfo parameter of the DrvDocumentPropertySheets function is NULL, and if either the fMode member of the DOCUMENTPROPERTYHEADER structure is zero, or the pdmOut member of the same structure is NULL, a driver should write the total size of the printer's DEVMODEW structure (including the public and private structure members) in the cbOut member. In such a case, a driver should treat the cbOut member as a "write-only" member. Thus, your driver should not use cbOut member as the size of the buffer pointed to by the pdmOut member if the DrvDocumentPropertySheets function has been called. The "plotter" sample that ships with the Windows Driver Kit (WDK) demonstrates how to use the cbOut member correctly.
Clarification Needed on DrvDocumentPropertySheets Function Documentation
本齐 谢
0
Reputation points
The documentation for the DrvDocumentPropertySheets function in winddiui.h includes the following statement:
"If the fMode member of the DOCUMENTPROPERTYHEADER structure is zero, or if the pdmOut member of the same structure is NULL, the function should return just the total size of the printer's DEVMODEW structure, including public and private structure members, in the DOCUMENTPROPERTYHEADER structure's cbOut member."
Does this mean that the total size of the DEVMODEW structure should be set to the cbOut member and that value should also be returned?