I'm getting this error in my VB.Net application:
when trying to use a function called GetMD5String() in a Timer1_Tick sub.Argument not specified for parameter 'strFileName' of 'Private Function GetMD5String(strFilename As String) As String
I'm using this code:
Code:Private Function GetMD5String(ByVal strFilename As String) As String Dim cMD5 = Security.Cryptography.MD5.Create Dim bytHash As Byte() Dim sb As New System.Text.StringBuilder Dim scanbox As New TextBox scanbox.Text = My.Computer.FileSystem.ReadAllText("viruslist.txt").ToString Me.OpenFileDialog1.FileName = strFilename Using cStream As New IO.FileStream(strFilename, IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.Read) bytHash = cMD5.ComputeHash(cStream) End Using For Each c In bytHash sb.Append(c.ToString("X2")) Next If scanbox.Text.Contains(sb.ToString) Then TextBox1.Text = (strFilename) Me.OpenFileDialog1.FileName = strFilename Detect.ShowDialog() WriteToLog("Malicious exploit detected.") Quarantinevb.ListBox1.Items.Add(strFilename) End If Return sb.ToString End Function
and this code for Timer1_Tick
Code:Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick RefreshList() Timer1.Enabled = False 'Stops the timer Timer1.Enabled = True GetMD5String() End Sub
Why is GetMD5String() throwing me this error?![]()




Reply With Quote
