我的vc函数原形:int func(int ff,char*pointer,int yy)
在vb中如何声名该函数的原形,尤其是指针???

解决方案 »

  1.   

    To pass string between VC DLL and VB, please refer to the 
    article below:Q187912 HOWTO: Pass a String Between Visual Basic and Your C DLL
    http://support.microsoft.com/support/kb/articles/q187/9/12.aspQ118643 How to Pass a String or String Arrays Between VB and a C DLL
    http://support.microsoft.com/support/kb/articles/q118/6/43.asp
      

  2.   

    vc中必须声明为stdcall,字符串用LPCSTR不用char*int __stdcall func(int ff,LPCSTR pointer,int yy);vb中字符串用byval不用byref...fun(byval ff as integer, byval pointer as string, byval yy as integer) as integer;
      

  3.   

    其实我想用char*pointer指向char的数组我想使用0-255的数,如果在vb中用String,这样就不能指代不可见的值了
      

  4.   

    Extern "C" _declepce(dllexport)int WINAPI func(int ff,LPTSTR pointer,int yy);
    //使用 WINAPI 标志是必要的,不然VB无法识别
    声明:
    Private Declare Function funcLib "youdll.dll" (ByVal ff As Long,ByVal pointer As String,ByVal yy As Long) As Long
      

  5.   

    >>其实我想用char*pointer指向char的数组我想使用0-255的数,如果在vb中用String,这样就不能指代不可见的值了那就把数字转成字符串,vb再解出来