Since C++ can't access BlitzMax lists, here is my function to iterate through all entities in the world. What would the C++ end of this look like?
Function dll_ForEachEntityDo(func:Byte Ptr) "win32" Local entity:TEntity Local callback:Int(hentity:Int) "win32" callback=func For entity=EachIn currentworld().entities If callback(entity.handle)=0 Return Next EndFunction