BlitzMax dll executing a C++ function pointer

BlitzMax Forums/BlitzMax Programming/BlitzMax dll executing a C++ function pointer

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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