Send Regular Order Cancel Request

    // Prerequisites: Variable "order" of type FIXRegularOrder.
    FIXMessage cancelReqMsg = order.createOrderCancelRequest();
    // Add fields such as "ClOrdID" etc ...
    // No need to acquire the global lock (See FIXOrderManager.SyncRoot).

    try {
        // Note: An exception may be thrown out.
        // The exception may be caused by application program error (e.g. duplicated ClOrdID); 
        // or system error (e.g. underlying FIX session connection is down; depends on 
        // FIXSessionOrderManagerSettings.alwaysSendCancelRequest).
        // See FIXRegularOrder.addOrderCancelRequest for more details.
        order.addOrderCancelRequest(cancelReqMsg);
        // Event FIXSessionOrderManagerCommonListener.orderCancelRequestAdded will be triggered 
        // immediately before addOrderCancelRequest returns, within the same thread context.
    catch (Exception ex) {
        // TODO: Your own error handling logic ...
    }

This operation is thread safe.

This example works with FIX versions from 4.1 to 5.0+.