## Printer Device Driver

[prev][next][parent][TOC]

### Bidirectional Command Structures Format

All structures used by PrtQuery and PrtSet use offsets into the return buffer for variable-length data instead of returning pointers. This is done to make transmission of these bidirectional structures easier between processes and machines.

An example would be a structure that returns a description string. The field that references the storage location of this string would be a ULONG. If zero, then that string was not returned. If non-zero, the field is the offset, from the beginning of the output buffer, to the description string.

All structures with variable-length data should pack this data immediately following all the fixed-length structures. This way, *pcbOutData contains the number of bytes to copy from the beginning of the pOutData buffer.

Note: All returned structure offset fields are offsets from the beginning of the output buffer given, not offsets from the beginning of the structure .