Removes a port.<357>

 DWORD RpcDeletePort(
   [in, string, unique] STRING_HANDLE pName,
   [in] ULONG_PTR hWnd,
   [in, string] wchar_t* pPortName
 );

pName: A parameter specified in Print Server Name Parameters (section 3.1.4.1.4).

hWnd: The value of this parameter SHOULD be set to zero when sent and MUST be ignored on receipt.

pPortName: A pointer to a string that specifies the name of the port that is deleted. For rules governing port names, see section 2.2.4.10.

Return Values: This method MUST return zero (ERROR_SUCCESS) to indicate successful completion or a nonzero Windows error code to indicate failure [MS-ERREF].

Upon receiving this message, the server MUST validate the following:

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: