这个是C++中 RECT的定义typedef struct tagRECT
{
    LONG    left;
    LONG    top;
    LONG    right;
    LONG    bottom;
} RECT, *PRECT, NEAR *NPRECT, FAR *LPRECT;

解决方案 »

  1.   

    [StructLayout]
    struct rect{
     int left;
     int top;
     int right;
     int bottom;
    }
      

  2.   

    出现这个错误
    无法封送处理“parameter #3”: 无效的托管/非托管类型组合。
      

  3.   

    public struct RECT
    {
    public int Left;
    public int Top;
    public int Right;
    public int Bottom;
    }有说可以用System.Drawing.Rectangle, 但我没有试过。
      

  4.   

    [StructLayout(LayoutKind.Sequential)]
    struct rect
    {
        int left;
        int top;
        int right;
        int bottom;
    }
      

  5.   

    有几种选择:1. 删除原来的,找新的。
    2. 用c++写一个接口dll。