declare function myfunction()

解决方案 »

  1.   

    declare Sub myfunction Lib 库名 (ByRef host as string, ByVal port As dpl_port_t, ByRef conn As conn_desc)
      

  2.   

    是不是有指针的就用BYREF呀?
      

  3.   

    我再纠下一下:
    declare Sub myfunction Lib 库名 (Byval host as string, ByRef port As dpl_port_t, ByRef conn As conn_desc)Char* 可以直接传入指针
    其它必须ByRef
      

  4.   

    是不是只有CHAR*可以用Byval,其它都要用ByRef呢?
      

  5.   

    那我想再问一下,如果C里面是int,unsigned char,unsigned short,unsigned int,signed char,signed short,signed int,_int64,long long,unsigned int,等等怎么转换成VB里面的变量呢?还有C里面的数据类型怎么转换成VB的数据类型?
      

  6.   

    应该是:
            |  VB6  | VB.Net
    int       | Long  |Short
    unsigned char  | Byte  |Byte
    unsigned short | Integer |Short
    unsigned int  | Long  |Integer
    signed char   | Byte  |Byte
    signed short  | Integer |Short
    signed int   | Long  |Integer
    _int64     | (无)  |Long
    long       | Long  |Integer
      

  7.   

    应该是:
            |  VB6  | VB.Net
    int       | Long  |Short
    unsigned char  | Byte  |Byte
    unsigned short | Integer |Short
    unsigned int  | Long  |Integer
    signed char   | Byte  |Byte
    signed short  | Integer |Short
    signed int   | Long  |Integer
    _int64     | (无)  |Long
    long       | Long  |Integer