1.7 Versioning and Capability Negotiation
This specification covers versioning issues in the following areas:
Supported Transports: The Print System Remote Protocol requires use of RPC over named pipes only.
Protocol Versions: The protocol version specified in the Interface Definition Language (IDL) file is 1.0.
Return Values: The methods that make up this RPC interface require a return value of zero to indicate successful completion and nonzero values to indicate failure, except where specified otherwise. A server-side implementation of this protocol would preferably use any nonzero Win32 error value to signify an error condition, as described in section 1.8. Unless otherwise specified, the client side of the Print System Remote Protocol is not allowed to interpret returned error codes. Unless otherwise specified, the client side of the Print System Remote Protocol is required to simply return error codes to the invoking application without taking any protocol action.
Capability Negotiation: Functional negotiation is supported through the use of Container levels; see section 18.104.22.168. On connection to a server, the client requests a level. If the information level is a level supported by the server, the server is required to process the request. Otherwise, the server has to return an error to the client, and the client would preferably repeat the request with a lower level.
Versioning of data structures defined by the protocol is controlled using a Level value in all Containers (section 22.214.171.124); the usage pattern of Level values is defined in section 2.2. Levels can be sequential, and data structures identified by a later version level, if extending an earlier level, are a superset of the data structure identified by the earlier level. The Level value is also a parameter to some RPC methods.
Furthermore, to avoid unnecessary network calls, the client determines the server's capabilities by comparing the value returned by the server in the dwBuildNumber member of OSVERSIONINFO (section 126.96.36.199.1) with well-known version-specific dwBuildNumber values.<2>