我有一个DLL,知道一个函数的原型如下:
WINAPI void  TK_Show(int *count,BYTE *ret);请各位大虾在VB中该怎么声明和调用这个函数?谢谢!

解决方案 »

  1.   

    Public Declare sub TK_Show Lib "DLL的路径" (ByDef int as 类型,BByDef YTE as 类型)
      

  2.   

    象这样:Private Declare Function TK_Show Lib "xxx.dll" (ByVal hwndCaller As Long, ByVal pszFile As String) As Long
      

  3.   

    Declare Function TK_Show Lib "xxx.dll" (count As Long, ret As Byte) As Longdim count as long
    dim ret(1024) as byte
    dim retVal as long......
    retVal = TK_Show(count,ret(0))
      

  4.   

    Private Declare Function TK_Show Lib "xxx.dll" (ByVal hwndCaller As Long, ByVal pszFile As String) As Long
    调用
    dim a(10) as long 
    dim b(10) as byte
    call tk_show(varptr(a(0)), varptr(b(0)))
      

  5.   

    或者
    Private Declare Function TK_Show Lib "xxx.dll" (ByRef hwndCaller As Long, ByRef pszFile As String) As Long`
    调用
    dim a(10) as long 
    dim b(10) as byte
    call tk_show(byval varptr(a(0)), byval varptr(b(0)))
      

  6.   

    ??????????????????????????
    ???????????????????????????
    ??????????????????????????
    ???????????????????????????还不行啊,WINAPI void  TK_Show(int *count,BYTE *ret);中
    参数count和ret都是TK_Show要返回的数据
      

  7.   

    Private Declare Function TK_Show Lib "xxx.dll" (ByRef hwndCaller As Long, ByRef pszFile As String) As Long`
    调用
    dim a(10) as long 
    dim b(10) as byte
    call tk_show(varptr(a(0)), varptr(b(0)))
      

  8.   

    Private Declare Function TK_Show Lib "name.dll" (ByVal hwndCaller As Long, ByVal pszFile As String) As Long