I need to use a native dll in my c# program which is written in c/c++. One of the functions of this dll that i need to use in my program, gets a struct as its parameter.
typedef struct
{
REPLY_TYPE replyType;
union
{
POSITIVE_REPLY positiveReply;
NEGATIVE_REPLY negativeReply;
}
message;
}
REPLY, *LPREPLY;
and the POSITIVE_REPLY and NEGATIVE_REPLY fiels are another structs :
typedef struct
{
BYTE bCommandCode;
BYTE bParameterCode;
struct
{
BYTE bE1;
BYTE bE0;
}
ErrorCode;
struct
{
DWORD dwSize;
BYTE bBody[ MAX_DATA_ARRAY_SIZE];
}
Data;
}
NEGATIVE_REPLY, *LPNEGATIVE_REPLY;
How should I do this ? thanks.