See docs
https://learn.microsoft.com/en-us/dotnet/framework/interop/marshalling-classes-structures-and-unions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi~
I have some codes in C and I try to create a DLL for another C# program to invoke
In my C codes I have a global array of self-defined struct which hold some data and properties, which may goes like:
struct Data {
double t;
double states[6]
......
}
struct Data dt[20];
I wonder how to get this pointer to the array of struct ( struct Data dt[20];) in C# so that the C# codes can manipulate the array of struct both by invoke the C functions and call new C# functions
Thank you