DLL中函数sele_exp_port(port:integer;exp:char):integer;我定义方法时,返回方法的类型应该这么定义?public static extern (用什么类型?)sele_exp_port(Int32 coms,String exp);

解决方案 »

  1.   

    说错了,是这样的.如果楼上用Int32那第二个参数exp如何使用啊DLL中函数sele_exp_port(port:integer;exp:char):integer;我定义方法时,返回方法的类型应该这么定义?public static extern (用什么类型?)sele_exp_port(Int32 coms,char exp); 
      

  2.   

    public static extern int sele_exp_port(int coms,byte exp);  
      

  3.   

    现在一般是int,你的函数返回时integer那就是int了,一样的,除非你的是返回long就用long接收
      

  4.   

    我的意思是我的返回值不是有两个吗?一个int和一个char.如果是 string 和 int 那么这个方法的返回类型应该按哪一个定义?