G
Guest
I have a function in C which takes a pointer to a pointer to a structure. It
then returns a linked list.
How do I call, via P/Invoke, from C# to C.
struct LinkedList
{
char *value;
struct LinkedList *next;
}
void CreateList(struct LinkedList **pPtr)
{
// creates the linked list
}
How do I call CreateList from C#? I know I need to declare the structure
and then create an instance of this structure, but I can't figure out how to
pass a pointer to a pointer to the structure.
- Bruce
then returns a linked list.
How do I call, via P/Invoke, from C# to C.
struct LinkedList
{
char *value;
struct LinkedList *next;
}
void CreateList(struct LinkedList **pPtr)
{
// creates the linked list
}
How do I call CreateList from C#? I know I need to declare the structure
and then create an instance of this structure, but I can't figure out how to
pass a pointer to a pointer to the structure.
- Bruce