M
Marcel Ruff
Hi,
i have an unmanaged C dll and i call a function from C#
which returns a pointer on a struct inside the C dll:
// C# code:
//member variable
IntPtr intPtr;
someMethod() {
intPtr = getStruct(); // calls C dll
}
when i later use the intPtr (passing it to C dll) it seems to point to another
memory location.
I have tried something like
fixed (void *p = intPtr.ToPointer()) {
...
}
but this does not compile:
"You cannot use the fixed statement to take the address of an already fixed expression"
How can i fix my memory location?
Thanks
Marcel
i have an unmanaged C dll and i call a function from C#
which returns a pointer on a struct inside the C dll:
// C# code:
//member variable
IntPtr intPtr;
someMethod() {
intPtr = getStruct(); // calls C dll
}
when i later use the intPtr (passing it to C dll) it seems to point to another
memory location.
I have tried something like
fixed (void *p = intPtr.ToPointer()) {
...
}
but this does not compile:
"You cannot use the fixed statement to take the address of an already fixed expression"
How can i fix my memory location?
Thanks
Marcel