Irvine, Francis, active 1796-1810, Lieutenant