如题

解决方案 »

  1.   

    不懂。但可以使用variant来表示未知类型。这样也可以转换成任何想要的类型。
      

  2.   

    Delphi里的Pchar好像是为了兼容WindowsAPI的数据类型,
    VB里没有对应的类型,VB里字符串只有String,指针用Long型吧
    是往Delphi里传参数码?就用String啊,不行用Strconv(str,vbFroimUnicode)试一下
      

  3.   

    String类型
    不行就用
    Any 类型
      

  4.   

    我用vb调用delphi中的dll时候 遇到问题  例子如下:delphi中的函数如下:
    Function Listen (ListenPort:integer):boolean; stdcall; external 'JustPipe.Dll';
    Function SetOnFileArrive(Const p_Port :Integer;
    Const p_OnFileArrive:TOnFileArrive):Boolean; stdcall; external 'JustPipe.Dll';
    TOnFileArrive=Procedure(Const p_FileName:PChar):Integer; stdcall;vb中我个人写的声明及回调函数
    Declare Function Listen Lib "JustPipe" (ByVal port As Integer) As Boolean
    Declare Function SetOnFileArrive Lib "JustPipe" (ByVal port As Integer, ByRef d As Long) As Boolean
    //下面函数是调用dll中的SetOnFileArrive函数 以及传递我的回调函数的地址
    Public Sub Hook()
    Listen 2000
    a = SetOnFileArrive(2000, AddressOf gcb)End Sub
    End Sub
    回调函数如下:
    Public Sub gcb(ByVal filename As String)
       MsgBox "ok"
    End Sub以上哪儿出了问题  为啥调用不成功
      

  5.   

    SetOnFileArrive(2000, AddressOf gcb)
    这里应该是 
     SetOnFileArrive(2000, byval AddressOf gcb)
    传 gcb 的地址的的值