A
Angel
I'm using several C functions (in a dll) that receive a struct as parameter.
Since I'm doing it in C#, I assume I need to recreate the struct in C# in
order to call the function with the required parameter. What would I need
to do in order to convert a struct that looks like this:
typedef struct
{
char rsvd0[4];
char iadl1[50+1];
char iadl2[50+1];
char ictyi[50+1];
struct { //nested struct
char a;
char b;
char c;
} foot;
ADSR_REC stack[10];
char rsvd4[194];
} DIR_PARM;
into a C# struct? I'm already able to call functions w/o parameters from my
application (through DllImport) but I'm having trouble calling a function
that requires this struct as parameter. And the "real" structure is
declared in Header file that I can't access (with #include). If I were doing
the program in C/C++ I would only need to include this header file and the
argument has to point to the struct. And how would I access DIR_PARM.foot.a
?
Any help would be appreciated.
Since I'm doing it in C#, I assume I need to recreate the struct in C# in
order to call the function with the required parameter. What would I need
to do in order to convert a struct that looks like this:
typedef struct
{
char rsvd0[4];
char iadl1[50+1];
char iadl2[50+1];
char ictyi[50+1];
struct { //nested struct
char a;
char b;
char c;
} foot;
ADSR_REC stack[10];
char rsvd4[194];
} DIR_PARM;
into a C# struct? I'm already able to call functions w/o parameters from my
application (through DllImport) but I'm having trouble calling a function
that requires this struct as parameter. And the "real" structure is
declared in Header file that I can't access (with #include). If I were doing
the program in C/C++ I would only need to include this header file and the
argument has to point to the struct. And how would I access DIR_PARM.foot.a
?
Any help would be appreciated.