INtime SDK Help

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 ntxReceiveRtMessage or ntxReceiveRtReply 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.

NTXSTATUS ntxDetachRtPort(


The port from which messages are currently forwarded.

Return Values

The appropriate status code.
Failure. To determine the status, call ntxGetLastRtError.


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.
The RT client on which the port was created is now invalid.
The DLL could not contact the RT kernel to complete the request.


Versions Defined in Include Link to
INtime 3.0 intime/nt/include/ntx.h ntx.h ntx.lib
INtime 4.01 (for 64-bit Windows) intime/nt/include/ntx.h ntx.h ntx64.lib

See Also

Port system calls, ntxReceiveRtMessage, ntxReceiveRtReply