OK I got it thanks to bj's help through pm
index = 0
OBJHANDEL myhandle = opaiGetVesselByIndex (index); // this will get the first vessel in the index and give it a handle named myhandle
char *vessel_name;
oapiGetObjectByname (myhandle, vessel_name,20); the 20 is space to hold the name...