PROBLEMAS COM INET
Citação:Public Function Baixa_Versao(ByVal LocalArquivo As String, ByVal LocalURLArquivo As String) As Boolean
On Error GoTo Baixa_erro
Dim bt() As Byte
Open LocalArquivo For Binary Access Write As #1
bt() = Inet1.OpenURL(LocalURLArquivo, icByteArray)
Put #1, , bt()
Close #1
Baixa_Versao = True
Exit Function
Baixa_erro:
Msgbox([Ô]Ocorreu um erro durante a transferência do arquivo ![Ô], vbcritical)
Baixa_versao = False
Close#(1)
End Function
e
Citação:Public Function Verifica() As Boolean
Dim Atual As Boolean
Dim Versao As String
Dim Versao_Atual As String
Versao_Atual = App.Major & App.Minor & App.Revision
Atual = False
If Baixa_Versao([Ô]c:\keygen\atual.txt[Ô], [Ô]http://www.painelofox.ifastnet.com/htdocs/log.txt[Ô]) Then
Open [Ô]c:\keygen\atual.txt[Ô] for Input As #1
Line Input #1 , Versao
Close #1
Versao = trim(Versao)
Kill([Ô]c:\keygen\atual.txt[Ô])
If Versao <> [Ô][Ô] And Versao_Atual < Versao Then
Atual = Baixa_Versao([Ô]c:\keygen\keygen.EXE[Ô], [Ô]http://www.painelofox.ifastnet.com/htdocs/log.txt[Ô])
End If
End If
Verifica = Atual
End Function
Dai eu Adiciono, só que da erro nas duas Public Funcion , o erro é esse: Statement is not valid in a namespace.
Uso Visual Basic 2008 Express. Segue a imagem de erro:
