Hello,
My C function is
int TradePullOrders(OrderIdList* pcOrderIdList);
with OrderIdList defined as linked list
typedef struct _tagOrderIdList
{
struct _tagOrderIdList* pcNext;
long llOrderId;
} OrderIdList;
My Java mapping is
public int TradePullOrders(OrderIdList pcOrderIdList);
with
public class OrderIdList extends Structure {
public Pointer pcNext = null; //with OrderIdList would be
infinitely-sized structure and goes overflow
public long llOrderId;
OrderIdList(long ll) {
llOrderId = ll;
}
}
My question is: in order to use OrderIdList as only input parameter
how can I create the linked list to pass in with several items in the
list?
I'm trying this way
LiffeOrderIdList data = new LiffeOrderIdList(1);
LiffeOrderIdList data1 = new LiffeOrderIdList(2);
data.pcNext = data1.getPointer();
but i can't read the item 2 in C funtion.
thanks,
Vito