You are using vector as pointer. It's very good when you need use it in Swift.
You can use void*
instead:
long GrabberInitializeAndProcess(
unsigned char* pbInPixels,
int inStride,
unsigned char* pbOutPixels,
int outStride,
int width,
int height,
Point mqTopLeft,
Size mqSize,
void * pForegroundMarks,
void * pBackgroundMarks,
void* pGrabberState );
And perform typecasting in implementation.
Or if you need type safety, you can white:
typedef struct _vectorOfPolylineElement *vectorOfPolylineElementPtr;
long GrabberInitializeAndProcess(
unsigned char* pbInPixels,
int inStride,
unsigned char* pbOutPixels,
int outStride,
int width,
int height,
Point mqTopLeft,
Size mqSize,
vectorOfPolylineElementPtr pForegroundMarks,
vectorOfPolylineElementPtr pBackgroundMarks,
void* pGrabberState );
And in implementation:
typedef struct _vectorOfPolylineElement
{
std::vector<PolylineElement> val;
} *vectorOfPolylineElementPtr;
And if you actually don't need vector in GrabberInitializeAndProcess, just it elements you can work with memory:
long GrabberInitializeAndProcess(
unsigned char* pbInPixels,
int inStride,
unsigned char* pbOutPixels,
int outStride,
int width,
int height,
Point mqTopLeft,
Size mqSize,
PolylineElement * pForegroundMarks,
size_t foregroundMarksCount,
PolylineElement * pBackgroundMarks,
size_t backgroundMarksCount,
void* pGrabberState );