Export (0) Print
Expand All

3.1.4.6.1 RpcEnumPorts (Opnum 35)

RpcEnumPorts enumerates the ports that are available for printing on a specified server.

DWORD RpcEnumPorts(
  [in, string, unique] STRING_HANDLE pName,
  [in] DWORD Level,
  [in, out, unique, size_is(cbBuf), disable_consistency_check] 
    BYTE* pPort,
  [in] DWORD cbBuf,
  [out] DWORD* pcbNeeded,
  [out] DWORD* pcReturned
);

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

Level: The port information level.

Value Meaning

0x00000001

Corresponds to _PORT_INFO_1, specified in section 2.2.2.8.1.

0x00000002

Corresponds to _PORT_INFO_2, specified in section 2.2.1.9.2.

pPort: A pointer to the BUFFER, as specified in INFO Structures Query Parameters, section 3.1.4.1.9.

BUFFER TYPE: _PORT_INFO.

This parameter can be NULL if cbBuf equals zero.

cbBuf: A parameter specified in INFO Structures Query Parameters, section 3.1.4.1.9.

pcbNeeded: A parameter specified in INFO Structures Query Parameters, section 3.1.4.1.9.

pcReturned: A parameter specified in INFO Structures Query Parameters, section 3.1.4.1.9.

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:

  • Perform the validation steps specified in Print Server Name Parameters, section 3.1.4.1.4.

  • Perform the validation steps specified in INFO Structures Query Parameters, section 3.1.4.1.9.

  • Additional validation MAY<402> 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:

  • Enumerate all ports on the print server.

  • Using the enumerated objects, perform the processing and response steps specified in INFO Structures Query Parameters, section 3.1.4.1.9.

  • Return the status of the operation.

 
Show:
© 2014 Microsoft