MgslCancelTransmit


Prototype  
ULONG MgslCancelTransmit( HANDLE hDevice );
Parameters  
hDevice
Handle to open port
Return Value  
ERROR_SUCCESS (0)
Success
ERROR_INVALID_HANDLE
hDevice is invalid

Cancel a pending call to MgslTransmit. In HDLC mode the API terminates the current frame and sends an abort sequence. In asynchronous mode, the API discards any remaining data. The API set the transmit status to TxStatus_Cancel and signals the event object. Monitor the event object until signaled before calling MgslTransmit again. Calling MgslCancelTransmit when no transmit is pending has no effect. A transmission may complete normally just after calling MgslCancelTransmit but before actually canceling the transmission.

Calling this function does not disable the transmitter. The transmitter will continue to send idle characters after the abort until another frame is transmitted or MgslEnableTransmitter is called with the FALSE flag.

When operating in HDLC/SDLC Loop Mode, calling MgslCancelTransmit will cancel any transmit in progress and automatically switch the adapter into repeat mode, where all data received on the receive pin is automatically echoed to the transmit data pin.

Note: Buffered Transmit Mode

If the application was sending frames in a buffered mode, any buffered frames will be discarded and there will be no status information returned to the application.

See also: Sending Data, Using Buffered Transmits, Asynchronous API Notification, HDLC/SDLC Loop Mode


Previous Contents Next