找回密码
 加入
搜索
查看: 2026|回复: 2

[系统综合] 一段加密狗的调用,如何改成au3的呢

[复制链接]
发表于 2010-11-27 17:27:49 | 显示全部楼层 |阅读模式
Imports System.Runtime.InteropServices
Module NT119API
    '查找加密锁
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NTFindFirst", CallingConvention:=CallingConvention.StdCall)> _
Public Function NTFindFirst(ByVal NTCode As String) As Integer

    End Function

    '查询硬件ID
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NTGetHardwareID", CallingConvention:=CallingConvention.StdCall)> _
Public Function NTGetHardwareID(ByRef HardwareID As Byte) As Integer

    End Function

    '登录加密锁
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NTLogin", CallingConvention:=CallingConvention.StdCall)> _
    Public Function NTLogin(ByVal NTpassword As String) As Integer

    End Function

    '存储区数据读取
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NTRead", CallingConvention:=CallingConvention.StdCall)> _
Public Function NTRead(ByVal address As Integer, ByVal Length As Integer, ByRef pBuffer As Byte) As Integer
    End Function

    '存储区数据读取
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NTRead2", CallingConvention:=CallingConvention.StdCall)> _
Public Function NTRead2(ByVal address As Integer, ByVal Length As Integer, ByRef pBuffer As Byte) As Integer
    End Function

    '存储区数据读取
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NTRead3", CallingConvention:=CallingConvention.StdCall)> _
Public Function NTRead3(ByVal address As Integer, ByVal Length As Integer, ByRef pBuffer As Byte) As Integer

    End Function

    '存储区数据写入
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NTWrite", CallingConvention:=CallingConvention.StdCall)> _
Public Function NTWrite(ByVal address As Integer, ByVal Length As Integer, ByRef pBuffer As Byte) As Integer

    End Function

    '3DES解密
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NT3DESCBCDecrypt", CallingConvention:=CallingConvention.StdCall)> _
Public Function NT3DESCBCDecrypt(ByRef iv As Byte, ByRef pBuffer As Byte, ByVal Length As Integer) As Integer

    End Function

    '3DES加密
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NT3DESCBCEncrypt", CallingConvention:=CallingConvention.StdCall)> _
Public Function NT3DESCBCEncrypt(ByRef iv As Byte, ByRef pBuffer As Byte, ByVal Length As Integer) As Integer

    End Function

    '验证许可证
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NTCheckLicense", CallingConvention:=CallingConvention.StdCall)> _
Public Function NTCheckLicense(ByVal licenseCode As Integer) As Integer

    End Function

    'MD5加密
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NTMD5", CallingConvention:=CallingConvention.StdCall)> _
Public Function NTMD5(ByRef pInBuffer As Byte, ByVal dataLen As Integer, ByRef md5value As Byte) As Integer

    End Function

    '生成请求激活许可证信息
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NTChangeLicenseRequest", CallingConvention:=CallingConvention.StdCall)> _
Public Function NTChangeLicenseRequest(ByRef requestString As Byte, ByVal Length As Integer) As Integer

    End Function

    '激活许可证
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NTChangeLicense", CallingConvention:=CallingConvention.StdCall)> _
    Public Function NTChangeLicense(ByRef responseString As Byte) As Integer

    End Function

    '生成请求注册信息
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NTRegisterProductRequest", CallingConvention:=CallingConvention.StdCall)> _
   Public Function NTRegisterProductRequest(ByRef registerData As Byte, ByVal dataLen As Integer, ByRef requestString As Byte, ByVal requestStringLen As Integer) As Integer

    End Function

    '注册操作
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NTRegisterProduct", CallingConvention:=CallingConvention.StdCall)> _
      Public Function NTRegisterProduct(ByRef responseString As Byte) As Integer

    End Function

    '验证注册 
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NTVerifyProduct", CallingConvention:=CallingConvention.StdCall)> _
      Public Function NTVerifyProduct(ByRef registerData As Byte, ByVal Length As Integer) As Integer

    End Function



    '登出加密锁
    <DllImport("NT119.dll", CharSet:=CharSet.Ansi, EntryPoint:="NTLogout", CallingConvention:=CallingConvention.StdCall)> _
Public Function NTLogout() As Integer

    End Function

End Module
发表于 2010-11-28 22:02:49 | 显示全部楼层
好难...........
 楼主| 发表于 2010-11-29 11:48:43 | 显示全部楼层
有vb的代码,有人能改吗?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-15 12:43 , Processed in 0.073772 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表