Bom dia,
Ainda não consegui fazer testes com o código de ativação.
Estou enviando um pequeno projeto em VB6 para avaliação.
Obrigado.
Form:
Private Sub Command1_Click()
Dim nSeq As Integer
Randomize
nSeq = Format(CInt(Rnd() * 10000), “000000”)
Text1.Text = CStr(ConsultarSAT(nSeq))
Text2.Text = CStr(nSeq)
End Sub
Private Sub Command2_Click()
Dim nSeq As Integer
Dim CodAtivacao As String
Randomize
CodAtivacao = “12345678”
nSeq = Format(Int(Rnd() * 10000), “000000”)
Text1.Text = CStr(ConsultarStatusOperacional(nSeq, CodAtivacao))
Text2.Text = (CStr(nSeq)) & “,” & CodAtivacao
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Módulo:
Option Explicit
Public iRetorno As Integer
Public Declare Sub Sleep Lib “kernel32.dll” (ByVal dwMilliseconds As Long)
Public Declare Function FindWindow Lib “user32″ Alias “FindWindowA” (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function ConsultarSAT Lib “SAT.dll” (ByVal nSeq As Integer) As String
Public Declare Function ConsultarStatusOperacional Lib “SAT.dll” (ByVal nSeq As Integer, CodAtivacao As String) As String