3.1.4.8 RemoteQMGetQMQMServerPort (Opnum 7)

The RemoteQMGetQMQMServerPort method returns an RPC port number (see [MS-RPCE]) for the requested combination of interface and protocol.

 DWORD RemoteQMGetQMQMServerPort(
   [in] handle_t hBind,
   [in, range(0, 3)] DWORD dwPortType
 );

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

dwPortType:  Specifies the interface for which a port value is to be returned. One of the following values MUST be specified; otherwise, this method MUST return 0x00000000 to indicate failure.

Value

Meaning

 IP_HANDSHAKE

0x00000000

 Requests that the server return the RPC port number for the qmcomm and qmcomm2 interfaces bound to TCP/IP. For more information on the qmcomm and qmcomm2 interfaces, see [MS-MQMP]. The default port number is 2103.

 IP_READ

0x00000001

 Requests that the server return the RPC port number for the qm2qm interface bound to TCP/IP. For more information on the qm2qm interface, see section 3.1.4. The default port number is 2105.

 IPX_HANDSHAKE

0x00000002

 Requests that the server return the RPC port number for the qmcomm and qmcomm2 interfaces bound to SPX.<19> For more information on the qmcomm and qmcomm2 interfaces, see [MS-MQMP]. The default port number is 2103.

 IPX_READ

0x00000003

Requests that the server return the RPC port number for the qm2qm interface bound to SPX.<20> For more information on the qm2qm interface, see section 3.1.4. The default port number is 2105.

Return Values:  On success, this method returns a nonzero IP port value for the RPC interface specified by the dwPortType parameter. If an invalid value is specified for dwPortType, or if the requested interface is otherwise unavailable, or if any other error is encountered, this method MUST return 0x00000000.

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

As specified in section 3.1.3, this protocol configures a fixed listening endpoint at an RPC port number, which can vary. For the interface and protocol specified by the dwPortType parameter, this method returns the RPC port number determined at server initialization time. If the default port is already in use, the server SHOULD increment the port number by 11 until an unused port is found.