Sub Protect(ByVal lProcId As Long, ByVal bIsProtect As Byte, pdwResult As Unsigned Long)
上面是vc的函数参数请问在vb当中调用这个protect这三个参数如何写?Protect(GetCurrentProcessId, CByte(1), CLng(1))  我这样写老提示编译错误:函数或接口标记为限制的,或函数使用了VB中不支持的自动类型请帮忙举个例子如何调用,谢谢
分数不够请原谅!

解决方案 »

  1.   

    '声明
    Private Declare Function Protect Lib "Protect.dll" (ByVal lProcId As Long, ByVal bIsProtect As Byte, pdwResult As Long) As Long然后把这个dll放在system32或者你的程序根目录下,使用Protect函数试试
      

  2.   

    这个dll是注册的,直接在vb里面用的Public pidpro As New Protect tem = pidpro.ProtectPid(GetCurrentProcessId, CByte(1), CLng(1))是这样的
      

  3.   

    dim GetCurrentProcessId as long
    dim tem as long
    都有了么?
      

  4.   

    GetCurrentProcessId   是取当前程序的pid所以没有用到dim的
    tem  也定义了