You can use std::vector<Point> by calling Foo( &v[0], v.size() ) . But managing memory here can be tricky, as Point does not seem to provide any clean copy and purpose; a custom selector in the dispenser will be called for each item, even if it is copied.
If the vector should actually have points, then you can wrap it in a more complex class that calls AllocPoint for each insert (and inserts the results) and DeallocPoint for each delete (and for everything else in the destruction vector). This class should not allow write access to Point (non-const operator[] , non-constant iterators, etc.), however, since this will allow you to change any pointers in Point and lose what is necessary for DeallocPoint to work correctly. Presumably, there are other functions for manipulating Point ; you will need to ensure their availability through the shell interface.
source share