Recovery tool

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts Page 1 of 1
Contributors
User avatar
AnoPem
VIP - Donator
VIP - Donator
Posts: 441
Joined: Sat Jul 24, 2010 10:55 pm

Recovery tool
AnoPem
Does anyone know if it is posible to make an recovery tool in vb.net to recover deleted files when you have removed files from recycle bin. If so please make a tutorial :)
https://t.me/pump_upp
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Recovery tool
mandai
There are a few ways of doing data recovery.

If you have raw access to a drive you could use your own method to parse the filesystem, then you may be able to recreate deleted files.
You could also scan the disk for file data structures.
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: Recovery tool
MrAksel
Any way to get access to the raw data? I guess that would require a driver, and it might be hard to find one that suits your needs.
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Recovery tool
mandai
There is no reason why you would need to use a driver unless you want to bypass the operating system in some way or communicate directly with the hardware.

You can use the CreateFile function to access partitions/drives. Here is an example:
Code: Select all
    <DllImport("kernel32.dll")> Shared Function CreateFile(ByVal lpFileName As String, ByVal dwDesiredAccess As UInteger, ByVal dwShareMode As UInteger, ByVal lpSecurityAttributes As IntPtr, ByVal dwCreationDisposition As UInteger, ByVal dwFlagsAndAttributes As UInteger, ByVal hTemplateFile As IntPtr) As IntPtr
    End Function

    Private Sub btnTest_Click(sender As System.Object, e As System.EventArgs) Handles btnTest.Click

        Dim driveHandle As IntPtr = CreateFile("\\.\C:", IO.FileAccess.Read, IO.FileShare.ReadWrite, IntPtr.Zero, IO.FileMode.Open, 0, IntPtr.Zero)
        Dim safeDriveHandle As SafeFileHandle = New SafeFileHandle(driveHandle, True)

        Dim fs As FileStream = New FileStream(safeDriveHandle, FileAccess.Read)

        Dim data(512 - 1) As Byte
        Dim read As Integer = fs.Read(data, 0, data.Length)

        fs.Close()

        MsgBox("read " & read & " bytes")

    End Sub
4 posts Page 1 of 1
Return to “Tutorial Requests”