3.1.4.1 S_DSGetServerPort (Opnum 27)

This method returns the RPC endpoint port for a transport protocol. The client establishes a new binding to the server by using the returned port number.

 unsigned long S_DSGetServerPort(
   [in] handle_t hBind,
   [in, range(0,1)] unsigned long fIP
 );

hBind:  MUST specify an RPC binding handle, as specified in [MS-RPCE] section 2.

fIP:  Specifies the connected network protocol for which an RPC endpoint port is to be returned.

Value

Meaning

0x00000000

Causes the RPC endpoint port for an RPC over SPX protocol sequence, as specified in [MS-RPCE], to be returned.

0x00000001

Causes the RPC endpoint port for an RPC over TCP/IP protocol sequence, as specified in [MS-RPCE], to be returned.

Return Values:  If the method succeeds, the return value is the RPC endpoint port number. If the method fails, the server MUST return 0.

MQ_OK (0x00000000)

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

The server MUST support the RPC over TCP/IP protocol sequence. The server MAY support the RPC over SPX protocol sequence.<16> If the server does not support the RPC over SPX protocol sequence, the server MUST return 0 when the fIP parameter is zero.

If the server is using dynamic endpoints, the server MUST return the RPC endpoint port number. If the server is using static endpoints, the server MUST return 0.