I have a native C function that returns a linked list in the following form:
It actually returns a vlist_s *.
/*!
The vlist is single linked list that stores void pointers.
It has a cursor to traverse the list.
*/
typedef struct vlist_node_s{
void * item;
struct vlist_node_s * next;
} vlist_node_t;
typedef
struct vlist_s{
struct vlist_node_s * head;
struct vlist_node_s * tail;
struct vlist_node_s * cursor;
struct vlist_node_s * cursor_backlink;
unsigned int cursor_index;
unsigned int count;
void *(VLIST_CDECL *malloc) (size_t);
void (VLIST_CDECL *free) (void*);
} vlist_t;
Is there any way to pass the returned vlist_s pointer back to the C# method that made the original call?