INtime SDK Help
ntxDetachRtPort
INtime SDK v6 > About INtime > INtime Kernel > Ports > ntxDetachRtPort

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(
    NTXHANDLE hPort
);

Parameters

hPort
The port from which messages are currently forwarded.

Return Values

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

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

Requirements

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