problem is the withevent comment, but as all your doing is creating a cancelall, you don't need to worry about it, drop the withevents, try
Dim EccoApp as New Ecco.Application
Dim OB as New EccoApp.Orderbook
OB.CancelAll
or something similar, basically you should be able to do this in a...