during the third anglo-dutch war, he was given command of , a hundred-gun first-rate ship of the line. cox was also appointed captain of the fleet and knighted. he served as the duke of york's flag captain during the battle of solebay against the dutch. the "prince" was involved in some of the heaviest fighting, and cox was killed by an enemy shot while standing close to the duke. he was succeeded in command of the ship by john narborough.