补充:第一部分是原c/c++代码   ,第二部分是c#

解决方案 »

  1.   

    long 是 int64
    dword 是 ushort
      

  2.   


    Win32 Types CLR Type
    char, INT8, SBYTE, CHAR System.SByte
    short, short int, INT16, SHORT System.Int16
    int, long, long int, INT32, LONG32, BOOL , INT System.Int32
    __int64, INT64, LONGLONG System.Int64
    unsigned char, UINT8, UCHAR , BYTE System.Byte
    unsigned short, UINT16, USHORT, WORD, ATOM, WCHAR , __wchar_t System.UInt16
    unsigned, unsigned int, UINT32, ULONG32, DWORD32, ULONG, DWORD, UINT System.UInt32
    unsigned __int64, UINT64, DWORDLONG, ULONGLONG System.UInt64
    float, FLOAT System.Single
    double, long double, DOUBLE System.Double
      

  3.   


    handle  void*  System.IntPtr  32 位
    byte  unsigned char  System.Byte  8 位
    short  short  System.Int16  16 位
    word  unsigned short  System.UInt16  16 位
    int  int  System.Int32  32 位
    uint  unsigned int  System.UInt32  32 位
    long  long  System.Int32  32 位
    bool  long  System.Int32  32 位
    dword  unsigned long  System.UInt32  32 位
    ulong  unsigned long  System.UInt32  32 位
    char  char  System.Char  用 ANSI 修饰。
    lpstr  char*  System.String 或 System.StringBuilder  用 ANSI 修饰。
    lpcstr  const char*  System.String 或 System.StringBuilder  用 ANSI 修饰。
    lpwstr  wchar_t*  System.String 或 System.StringBuilder  用 Unicode 修饰。
    lpcwstr  const wchar_t*  System.String 或 System.StringBuilder  用 Unicode 修饰。
    float  float  System.Single  32 位
    double  double  System.Double  64 位
    我已经查过很多了 在定义结构体的时候类型转换方面应该没什么问题了  我觉得关键在我声明他的方法是是否正确