0

我需要在用 c/c++ 编写的 c# 程序中使用本机 dll。我需要在我的程序中使用的这个 dll 的功能之一是获取一个结构作为其参数。

typedef struct
{
    REPLY_TYPE      replyType;

    union
    {
        POSITIVE_REPLY  positiveReply;
        NEGATIVE_REPLY  negativeReply;
    }
    message;

}
REPLY, *LPREPLY;

POSITIVE_REPLY 和 NEGATIVE_REPLY 字段是另一个结构:

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;

我该怎么做?谢谢。

4

0 回答 0