INtime SDK Help
DetachRtPort (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.

Ends message forwarding from the specified message port. If you invoke this call with messages queued at the sink port, they remain at the sink port until removed with a receive operation.

When you detach a sink port using this call, subsequent messages to the ordinary port are not forwarded to the sink port. Messages previously forwarded to the sink port remain queued at the sink port until removed with a receive operation or until the port is deleted.

The receive information structure returned by ReceiveRtMessage or ReceiveRtReply indicates which port the message was forwarded from if you are receiving from a sink port.

Do not send a message to a sink port. Messages may only be sent from an ordinary port.

BOOLEAN DetachRtPort(
    RTHANDLE hPort    // handle for the port
);

Parameters

hPort
A handle for the source port to be detached.

Return Values

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

Status

E_OK 0x0000
No exceptional conditions occurred.
E_EXIST 0x0006
The hPort parameter does not refer to an existing object.
E_STATE 0x0007
The port does not have a sink port attached.
E_TYPE 0x8002
The handle supplied is not for a port object.

Requirements

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

See Also

Port system calls, ReceiveRtMessage, ReceiveRtReply