INtime SDK Help
ConnectRtPort (deprecated)

From INtime 6.0 the INtime Service and Port objects have been deprecated.

New projects should not be started using these features, and existing projects will not work with XM mode. You will receive a compiler warning by default if you use these calls.

Creates a connection between a local port and a remote port, which automatically routes messages sent from the host port to the specified remote address on the remote host. While the connection exists, the connected port can receive messages only from the specified remote port.

The connection is active when you specify a default remote address with this call. To disconnect the default remote address, invoke this call and specify a NULL value for lpAddress. Once disconnected the port remains disconnected until specifically connected again. A port can be connected more than once, the most recent connection overriding all previous connections.

Note that there is no implied communication between the local and remote ports to make the connection.

BOOLEAN ConnectRtPort(
    RTHANDLE hPort,        // a handle for the port
    LPGENADDR lpAddress    // a pointer to a GENADDR structure containing the remote 
);

Parameters

hPort
A token for a port object.
lpAddress
A pointer to the GENADDR structure, identifying the remote port, or NULL.

Remarks

Internally, this call saves the contents of the GENADDR structure in the port object. While connected, a port can only exchange messages with the port specified in address structure given.

Return Values

TRUE
Success.
FALSE
Failure. To determine the status, call GetLastRtError.

Status

E_OK 0x0000
No exceptional conditions occurred.
E_CONTEXT 0x0005
The service does not handle addresses.
E_EXIST 0x0006
The port is already being deleted.
E_STATE 0x0007
The port is a sink port.
E_INVALID_ADDR 0x00E2
The address parameter is not valid.
E_UNBOUND 0x00EB
The port is not bound.
E_TYPE 0x8002
The handle supplied is not for a port object.
E_NUC_BAD_BUF 0x80E2
An invalid address pointer was supplied.
Note:   Other status values may be generated by the service-specific VerifyAddress handler.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/rtbase.h rt.h rt.lib

See Also

Port system calls, VerifyAddress, GENADDR