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