[fpc-pascal] How to call C++ function with Vector

Dennis dec12 at avidsoft.com.hk
Tue Sep 26 10:14:11 CEST 2017


I have a windows 32-bit dll written in C++ (probably C++ Builder).
It has 1 function which I need to call:

int SPAPI_GetProduct(vector<SPApiProduct>& apiProdList)

I am stuck at the keyword vector.

How is it translated into free pascal?

Is the following correct?

type
    TSPApiProduct_Array = array of SPApiProduct;

function SPAPI_GetProduct(var apiProdList : TSPApiProduct);stdcall;

Thanks a lot in advance.

Dennis



More information about the fpc-pascal mailing list