Re: Simple WinZip Program
Posted: Sat Jul 30, 2011 3:14 pm
Hey Dude,
i just made a small DLL File that u can use in VB.NET to Extract RAR Files using UnRAR.
it contains two Functions in the moment "ExtractToCurrentDirectory and ExtractRAR"
How to Use:
Import to get Access to the Functions
Here is the Source Code from the UnRAR Lib
Greetz Napster
i just made a small DLL File that u can use in VB.NET to Extract RAR Files using UnRAR.
it contains two Functions in the moment "ExtractToCurrentDirectory and ExtractRAR"
How to Use:
Import to get Access to the Functions
Code: Select all
Dim Variable to use it
Imports UnRAR.UnRAR
Code: Select all
First u need the Function SetPath to set the Path where the UnRAR.exe is stored
Dim rar as UnRAR.UnRAR = New UnRAR.UnRAR
Code: Select all
The two Extract Functions doesnt need Explantations.rar.SetPath("C:/UnRAR.exe")
Here is the Source Code from the UnRAR Lib
Code: Select all
Normally i wanted to use more Advanced Way with Process,the same Way how i do it with FFmpeg Command Line tool but it wasnt working with UnRAR,so i had to use this Way.Public Class UnRAR
Dim Path As String
Public Sub SetPath(ByVal UnRARpath As String)
Path = UnRARpath
End Sub
Public Function ExtractToCurrentDirectory(ByVal File As String) As String
Shell("cmd /k" & Path & " e " & File, AppWinStyle.Hide, True)
End Function
Public Function ExtractRAR(ByVal File As String, ByVal ExtractDir As String) As String
Shell("cmd /k" & Path & " x " & File & " " & ExtractDir, AppWinStyle.Hide, True)
End Function
End Class
Greetz Napster