本帖最后由 fpengge 于 2011-08-31 16:48:12 编辑

解决方案 »

  1.   

    public extern static int rf_load_key(int icdev, string  _Mode, string _SecNr, ref string _NKey);
      

  2.   

    楼上的不行啊,加上ref,断点跟踪显示pwd的值为空
      

  3.   

    [DllImport("xxxx.dll", CharSet=CharSet.Ansi)]
    public extern static int rf_load_key(int icdev, byte  _Mode, byte _SecNr, ref byte _NKey);
      

  4.   

    Wtypes.h 中的非托管类型  非托管C/C++ 
    语言类型  托管类名  说明 
    HANDLE  void*  System.IntPtr  在 32 位 Windows 操作系统上为 32 位,在 64 位 Windows 操作系统上为 64 位。
    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 位
      

  5.   

    楼主,既然已经声明成了net的方式,那就跟net的函数一样方式使用啊,你就当初一般的接口使用。