hi good am, i just want to know how to make a simple anti virus using visual basic 6.0, i just want to ask the code for
scan
delete
to detect a virus
to automatic play the anti virus program
thank you

Dani AI

Generated

This short expert note supplements 's original ask (and the follow-ups from and ). already pointed to a few online how‑tos, which are useful as starting points — but Visual Basic 6.0 is a legacy development environment and Microsoft recommends moving to supported/modern technologies for new security-sensitive software. (learn.microsoft.com)

A practical, minimal on‑demand scanner has three parts: a filesystem walker, a detection engine, and a safe-remediation step. Detection can be simple signature matching (file hashes or short byte patterns) plus basic heuristic checks; signatures must be updated regularly. When a match occurs, prefer quarantining the item rather than immediate permanent deletion — quarantining preserves the sample for analysis and avoids breaking the OS. For real projects consider using an existing engine (ClamAV) or a tested library rather than inventing your own signature pipeline. (clamav.net)

Example VB6 pattern for an on‑demand scan (reads each file and calls a placeholder hash/match routine):

Private Sub ScanFolder(ByVal path As String)
    Dim fName As String
    fName = Dir(path & "\*.*", vbNormal)
    Do While fName <> ""
        If (GetAttr(path & "\" & fName) And vbDirectory) = vbDirectory Then
            If fName <> "." And fName <> ".." Then ScanFolder path & "\" & fName
        Else
            CheckFile path & "\" & fName
        End If
        fName = Dir()
    Loop
End Sub

Private Sub CheckFile(ByVal filePath As String)
    Dim hFile As Integer, bytes() As Byte
    hFile = FreeFile
    On Error Resume Next
    Open filePath For Binary As #hFile
        If LOF(hFile) > 0 Then
            ReDim bytes(LOF(hFile) - 1)
            Get #hFile, , bytes
        End If
    Close #hFile
    ' h = ComputeHash(bytes) : If IsSignatureMatch(h) Then QuarantineFile(filePath)
End Sub

That VB6 approach is strictly on‑demand. Real‑time (on‑access) protection requires kernel‑level file‑system filter drivers (minifilters) or equivalent OS hooks — that is nontrivial and outside safe VB6 user‑mode code. (learn.microsoft.com)

Do not test with real malware on a live machine; use the EICAR test file when validating detection behavior. If this project is more than a learning exercise, prefer integrating an existing, actively maintained engine (ClamAV or vendor SDKs) or rewrite in a supported language and architecture. (eicar.org)

Recommended Answers

All 4 Replies

please say how to make a simple antivirus in vb 6.0 with instruction

please say how to make a simple antivirus in vb 6.0 with instruction

how about make your own thread...Don't rise old thread.
actually abu taher was provide some links about how to make antivirus..

I need the codes of the antivirus for visualbasic

commented: Good luck with that. -3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.