The A340 tow bar attatchment point is of a bar type connection. Similar to an A320 but larger. Also there's a difference in tow bars for the A340-200/300s and A340-500/600s.
As for the 777 I think a 767 bar will work as long as its got the right shear pins fitted.
Jimpy