220.127.116.11.4 RpcSetPort (Opnum 71)
DWORD RpcSetPort( [in, string, unique] STRING_HANDLE pName, [in, string, unique] wchar_t* pPortName, [in] PORT_CONTAINER* pPortContainer );
pName: A parameter that adheres to the specification in Print Server Name Parameters (section 18.104.22.168.4).
pPortName: A pointer to a string that specifies the name of the printer port. For rules governing port names, see section 22.214.171.124.
pPortContainer: A parameter that adheres to the specification in PORT_CONTAINER Parameters (section 126.96.36.199.8.5). The level as specified in the Level member of the PORT_CONTAINER structure MUST be 0x00000003.
Return Values: This method MUST return zero (ERROR_SUCCESS) to indicate successful completion or a nonzero Windows error code to indicate failure, as specified in [MS-ERREF].
Upon receiving this message, the server MUST validate parameters as follows:
Verify that the string that is referenced by pPortName represents a port installed on the server, and if validation fails, the server MUST fail the operation immediately and return ERROR_UNKNOWN_PORT.
Perform the validation steps that are specified in Print Server Name Parameters.
Perform the validation steps that are specified in PORT_CONTAINER Parameters.
Additional validation MAY<414> be performed.
If parameter validation fails, the server MUST fail the operation immediately and return a nonzero error response to the client. Otherwise, the server MUST process the message and compose a response to the client as follows:
The pPortContainer parameter points to a PORT_CONTAINER structure. This structure references a PORT_INFO structure that contains members dwStatus, pszStatus, and dwSeverity. Copy these members to the port object that is referenced by the pPortName parameter.
Return the status of the operation.