by K.C.Vaishnav(Jaipur)9413863753 (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 28th June 2011
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Extract Password protect Zip/Rar Archive File
API Declarations
Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Spath = "C:\AKZPK.rar"
tpath = "C:\"
If Dir$("c:\program Files\winrar\winrar.exe") = "" Then
MsgBox "Winrar Is Not installed", vbQuestion
Exit Sub
End If
'Password - 08051976
processID = Shell("c:\progra~1\winrar\winrar e -inul -p08051976 " & Chr(34) & Spath & Chr(34) & " " & Chr(34) & tpath & Chr(34), vbHide)
process_handle = OpenProcess(SYNCHRONIZE, 0, processID)
If process_handle <> 0 Then
WaitForSingleObject process_handle, INFINITE
Call CloseHandle(process_handle)
End If
End Sub