Possible Duplicate:
Marshal C++ struct array into C#
I have an C++ .dll and I must use it with C# but there are some problems. First of all this is one of them.
Here for using C++ .dll file I must rechange below C++ struct to C# struct. Help me pls.
C++ sturcture:
typedef struct USMC_Devices_st{
DWORD NOD; // Number of the devices ready to work
char **Serial; // Array of 16 byte ASCII strings
char **Version; // Array of 4 byte ASCII strings
} USMC_Devices;
struct USMC_DEVICES_st would translate to something akin to:
Accessing Serial and Version could be done with code such as:
Edit – Following your comments here is a more detailed example of accessing the struct’s members: