OPEN_PRINT_FILE: Create Print Spool file

This message is sent to create a new printer file which will be deleted once it has been closed and printed.

Client Request
==================================
Description
=================================
UCHAR WordCount; Count of parameter words = 2
USHORT SetupLength; Length of printer setup data
USHORT Mode; 0 = Text mode (DOS expands TABs)
1 = Graphics mode
USHORT ByteCount; Count of data bytes; min = 2
UCHAR BufferFormat; 0x04
STRING IdentifierString[]; Identifier string

tid in the SMB header must refer to a printer resource type.

setuplength is the number of bytes in the first part of the resulting print spool file which contains printer-specific control strings.

mode can have the following values:

0 Text mode. The server may optionally expand tabs to a series of spaces.
1 Graphics mode. No conversion of data should be done by the server.

identifierstring can be used by the server to provide some sort of per-client identifying component to the print file.

Server Response
==================================
Description
=================================
UCHAR WordCount; Count of parameter words = 1
USHORT Fid; File handle
USHORT ByteCount; Count of data bytes = 0

fid is the returned handle which may be used by subsequent write and close operations. When the file is finally closed, it will be sent to the spooler and printed.

Errors

ERRDOS/ERRnoaccess
ERRDOS/ERRnofids
ERRSRV/ERRinvdevice
ERRSRV/ERRbaduid
ERRSRV/ERRqfull
ERRSRV/ERRqtoobig