3.2.4.3 CprepPrepareNode (Opnum 5)

The CprepPrepareNode method prepares the server in an implementation-specific way to execute the other methods in the interface. It also informs the client about version information.

This method is called before any other.

 HRESULT CprepPrepareNode(
   [out] unsigned long* pulMajorVersion,
   [out] unsigned long* pulMinorVersion,
   [out] unsigned long* pdwCPrepVersion
 );

pulMajorVersion: The server MUST set this to the operating system major version.

pulMinorVersion: The server MUST set this to the operating system minor version.

pdwCPrepVersion: The client MUST ignore this value.

Return Values: A signed 32-bit value that indicates return status. If the method returns a negative value, it has failed. Zero or positive values indicate success, with the lower 16 bits in positive nonzero values containing warnings or flags defined in the method implementation. For more information about Win32 error codes and HRESULT values, see [MS-ERREF] sections 2.2 and 2.1.

Return value/code

Description

0x00000000

S_OK

The call was successful.

For any other condition, this method MUST return a value that is not one of the values listed in the preceding table. The client MUST behave in one consistent, identical manner for all values that are not listed in the preceding table.

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].

The opnum field value for this method is 5.

When processing this call the server MUST do the following:

  • Set pulMajorVersion as discussed earlier in this section.

  • Set pulMinorVersion as discussed earlier in this section.

  • Set the server Prepare State to Preparing.

The server returns the following information to the client:

  • The pulMajorVersion and pulMinorVersion output parameters set to the appropriate values. The pdwCPrepVersion value is set arbitrarily by the server and MUST be ignored by the client.