 The Dutch prisoners expressed their willingness to serve the Maharaja of Travancore.De Lannoy was entrusted with the job of training a Regiment of the army in European tactics of war and discipline.De Lannoy performed this task to the satisfaction of Marthanda Varma who appointed him Captain.