Use UnRar DLL functions ?

Just starting out? Need help? Post your questions and find answers here.
Micko
Enthusiast
Enthusiast
Posts: 244
Joined: Thu May 24, 2007 7:36 pm
Location: Senegal
Contact:

Use UnRar DLL functions ?

Post by Micko »

Hi !
i want to use the UnRar dll functions but i need your Help Guys ! :wink:
the Link:http://www.rarlab.com/rar_add.htm 3rd file
Thanks
hardfalcon
User
User
Posts: 89
Joined: Fri Apr 29, 2005 3:03 pm
Location: Luxembourg
Contact:

Post by hardfalcon »

"And God caused a deep sleep to fall upon Adam, and he slept: and he took one of his ribs, and closed up the flesh instead thereof; And the spare rib, which God had taken from man, made he a woman, and brought her unto the man"
Micko
Enthusiast
Enthusiast
Posts: 244
Joined: Thu May 24, 2007 7:36 pm
Location: Senegal
Contact:

Post by Micko »

hardfalcon
thanks a lot :D
i will check it and report back :wink:
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

Hi!

From the same author, a more advanced library. It will need a bit of tweaking, but you can use it to extend the mentioned code.

Link here:
http://chris-anselm.de/
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Micko
Enthusiast
Enthusiast
Posts: 244
Joined: Thu May 24, 2007 7:36 pm
Location: Senegal
Contact:

Post by Micko »

@Inf0Byt3
thanks for the link
User avatar
ar-s
Enthusiast
Enthusiast
Posts: 344
Joined: Sat Oct 06, 2007 11:20 pm
Location: France

Post by ar-s »

Hi, i'm new on this forum,

I don't know how this DLL could be use but for working with rar files (or making somes), i'm using rar.exe from winrar trial with a simple "runprogram" command.

I don't know if this can help so i give you some tips...


Choose packing mode like this

Code: Select all

Global rar$="c:\.....yourdirectory\rar.exe"
;(...)
rarpackmode.s
  If GetGadgetState(#Option_Fort) ; Strong packing
       rarpackmode = "-m5"
   Else
        rarpackmode = "-m0" ; no packing
    EndIf 
As parameters you can use :

Code: Select all

pass$=getgadgettext(#yourPassSting) ; password for rar
Size$=getgadgettext(#YouSizeChoice) ; if you want to cut your file in parts
Parameter$="a -s -ep -hp"+pass$+" "+rarpackmode+" "+"-v"+Size$+"m "+Chr(34)+Path$+nom_archive$+Chr(34)+" "+Chr(34)+File$+Chr(34) 
Then after you have configure good parameters, juste run it

Code: Select all

RunProgram(rar$,Parametre$,Fichier$,1)
Micko
Enthusiast
Enthusiast
Posts: 244
Joined: Thu May 24, 2007 7:36 pm
Location: Senegal
Contact:

Post by Micko »

@ar-s
thanks for the tips but i couldn't use rar.exe with my distribution. it isn't a free licence !
Micko
Enthusiast
Enthusiast
Posts: 244
Joined: Thu May 24, 2007 7:36 pm
Location: Senegal
Contact:

UnRar whith Unicode !

Post by Micko »

Hi Guys !
Is there a way to use unicode with this snippet ?
because when the destination path is like this :
C:\Documents and Settings\Mickaël\Destop
file are extracted but in this directory(or something like this)
C:\Documents and Settings\Mickaµl\Destop

edit: I have edit the code but when i try to compile this one invalid memory access message occure

download the Dll:
http://www.shadowtavern.com/users/micko/UnrarDLL.rar

Code: Select all

;PB_unRAR - Paul Leischow, Sept.6, 2002 
;RAR Archive extractor that uses the free UNRAR.DLL 

#RAR_OM_LIST=0 
#RAR_OM_EXTRACT=1 
#RAR_SKIP=0 
#RAR_TEST=1 
#RAR_EXTRACT=2 
#RAR_VOL_ASK=0 
#RAR_VOL_NOTIFY=1 
#RAR_DLL_VERSION=3 


Structure RARHeaderData 
  ArcName.b[260] 
  FileName.b[260] 
  Flags.l 
  PackSize.l 
  UnpSize.l 
  HostOS.l 
  FileCRC.l 
  FileTime.l 
  UnpVer.l 
  Method.l 
  FileAttr.l 
  *CmtBuf.s 
  CmtBufSize.l 
  CmtSize.l 
  CmtState.l 
EndStructure 
;rarheader.RARHeaderData 

Structure RAROpenArchiveData 
  ArcName.s 
  OpenMode.l 
  OpenResult.l 
  CmtBuf.s 
  CmtBufSize.l 
  CmtSize.l 
  CmtState.l 
EndStructure 
;raropen.RAROpenArchiveData 

 Global hDLL.l 
  Global *RAROpenArchiveEx.l 
  Global *RARCloseArchive.l 
  Global *RARReadHeaderEx.l 
  Global *RARProcessFileW.l 
  Global *RARSetChangeVolProc.l 
  Global *RARSetPassword.l 
  Global RarFile.s 
OpenLibrary(0,"unrar.dll") 
  
  *RAROpenArchiveEx.l = GetFunction(0, "RAROpenArchiveEx") 
  *RARCloseArchive.l = GetFunction(0, "RARCloseArchive") 
  *RARReadHeaderEx.l = GetFunction(0, "RARReadHeaderEx") 
  *RARProcessFileW.l = GetFunction(0, "RARProcessFileW") 
  *RARSetChangeVolProc.l = GetFunction(0, "RARSetChangeVolProc") 
  *RARSetPassword.l = GetFunction(0, "RARSetPassword") 

Procedure UnRar() 
      rarheader.RARHeaderData 
      raropen.RAROpenArchiveData 
      raropen\ArcName= RarFile 
      raropen\CmtBuf = Space(16384) 
      raropen\CmtBufSize = 16384 
      raropen\OpenMode=#RAR_OM_EXTRACT 
      hRAR=CallFunctionFast(*RAROpenArchiveEx,@raropen)
      Debug hRAR 
      If raropen\OpenResult 
        MessageRequester("Error","Could Not Open RAR File",#MB_ICONERROR) 
        Else        
        Repeat 
          stat=CallFunctionFast(*RARReadHeaderEx,hRAR,@rarheader) 
          If stat=0 
            filelist.s=PeekS(@rarheader\FileName) 
            res=CallFunctionFast(*RARProcessFileW,hRAR,#RAR_EXTRACT,"","C:\testrar\"+filelist.s) 
          EndIf 
        Until stat<>0 
        MessageRequester("Files Extracted",filelist,#MB_ICONINFORMATION) 
      EndIf 

      CallFunctionFast(*RARCloseArchive,hRAR) 
  
  CloseLibrary(0) 
  EndProcedure 
  
   RarFile=OpenFileRequester("","C:\","WinRar (*.rar)|*.rar",0) 
    
If RarFile :UnRar():EndIf
Last edited by Micko on Wed Jan 23, 2008 4:05 pm, edited 3 times in total.
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

You have to use the unicode functions of the lib i.e.

Code: Select all

RAROpenArchiveEx
RARReadHeaderEx
RARProcessFileW
Micko
Enthusiast
Enthusiast
Posts: 244
Joined: Thu May 24, 2007 7:36 pm
Location: Senegal
Contact:

Post by Micko »

Thanks you very much :D
Micko
Enthusiast
Enthusiast
Posts: 244
Joined: Thu May 24, 2007 7:36 pm
Location: Senegal
Contact:

Post by Micko »

ABBKlaus
i hav invalid memory access message when i compile the code (code edited)
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

this should work :

Code: Select all

;PB_unRAR - Paul Leischow, Sept.6, 2002 
;RAR Archive extractor that uses the free UNRAR.DLL 

#ERAR_END_ARCHIVE        = 10 
#ERAR_NO_MEMORY          = 11 
#ERAR_BAD_DATA           = 12 
#ERAR_BAD_ARCHIVE        = 13 
#ERAR_UNKNOWN_FORMAT     = 14 
#ERAR_EOPEN              = 15 
#ERAR_ECREATE            = 16 
#ERAR_ECLOSE             = 17 
#ERAR_EREAD              = 18 
#ERAR_EWRITE             = 19 
#ERAR_SMALL_BUF          = 20 
#ERAR_UNKNOWN            = 21 
#ERAR_MISSING_PASSWORD   = 22 

#RAR_HEADERFLAG_ENCRYPTED               = %00000100 
#RAR_OM_LIST             = 0 
#RAR_OM_EXTRACT          = 1 
#RAR_OM_LIST_INCSPLIT    = 2 

#RAR_SKIP                = 0 
#RAR_TEST                = 1 
#RAR_EXTRACT             = 2 

#RAR_VOL_ASK             = 0 
#RAR_VOL_NOTIFY          = 1 

#RAR_DLL_VERSION         = 4 

Structure RARHeaderData 
  ArcName.b[260] 
  FileName.b[260] 
  Flags.l 
  PackSize.l 
  UnpSize.l 
  HostOS.l 
  FileCRC.l 
  FileTime.l 
  UnpVer.l 
  Method.l 
  FileAttr.l 
  *CmtBuf.l 
  CmtBufSize.l 
  CmtSize.l 
  CmtState.l 
EndStructure 

Structure RARHeaderDataEx 
  ArcName.b[1024] 
  ArcNameW.w[1024] 
  FileName.b[1024] 
  FileNameW.w[1024] 
  Flags.l 
  PackSize.l 
  PackSizeHigh.l 
  UnpSize.l 
  UnpSizeHigh.l 
  HostOS.l 
  FileCRC.l 
  FileTime.l 
  UnpVer.l 
  Method.l 
  FileAttr.l 
  *CmtBuf.l 
  CmtBufSize.l 
  CmtSize.l 
  CmtState.l 
  Reserved.l[1024] 
EndStructure 

Structure RAROpenArchiveData 
  *ArcName.l 
  OpenMode.l 
  OpenResult.l 
  *CmtBuf.l 
  CmtBufSize.l 
  CmtSize.l 
  CmtState.l 
EndStructure 

Structure RAROpenArchiveDataEx 
  *ArcName.l 
  *ArcNameW.l 
  OpenMode.l 
  OpenResult.l 
  *CmtBuf.l 
  CmtBufSize.l 
  CmtSize.l 
  CmtState.l 
  Flags.l 
  Reserved.l[32] 
EndStructure 

Global RarLib.l 
Global RAROpenArchive.l 
Global RARCloseArchive.l 
Global RARReadHeader.l 
Global RARProcessFile.l 
Global RARSetCallback.l 
Global RARSetChangeVolProc.l 
Global RARSetProcessDataProc.l 
Global RARSetPassword.l 
Global RARGetDllVersion.l 

Prototype.l Prot_RAROpenArchive(a.l) 
Prototype.l Prot_RARCloseArchive(a.l) 
Prototype.l Prot_RARReadHeader(a.l,b.l) 
CompilerIf #PB_Compiler_Unicode=0 
  Prototype.l Prot_RARProcessFile(a.l,b.l,c.p-ascii,d.p-ascii) 
CompilerElse 
  Prototype.l Prot_RARProcessFile(a.l,b.l,c.p-unicode,d.p-unicode) 
CompilerEndIf 
Prototype.l Prot_RARSetCallback(a.l,b.l,c.l) 
Prototype.l Prot_RARSetChangeVolProc(a.l,b.l) 
Prototype.l Prot_RARSetProcessDataProc(a.l,b.l) 
CompilerIf #PB_Compiler_Unicode=0 
  Prototype.l Prot_RARSetPassword(a.l,b.p-ascii)
CompilerElse 
  Prototype.l Prot_RARSetPassword(a.l,b.p-unicode)
CompilerEndIf 
Prototype.l Prot_RARGetDllVersion() 

ProcedureDLL Rar_Init() 
  RarLib=OpenLibrary(#PB_Any,"unrar.dll") 
  If RarLib 
    CompilerIf #PB_Compiler_Unicode=0 
      RAROpenArchive.Prot_RAROpenArchive = GetFunction(RarLib, "RAROpenArchive") 
      RARReadHeader.Prot_RARReadHeader = GetFunction(RarLib, "RARReadHeader") 
      RARProcessFile.Prot_RARProcessFile = GetFunction(RarLib, "RARProcessFile") 
    CompilerElse 
      RAROpenArchive.Prot_RAROpenArchive = GetFunction(RarLib, "RAROpenArchiveEx") 
      RARReadHeader.Prot_RARReadHeader = GetFunction(RarLib, "RARReadHeaderEx") 
      RARProcessFile.Prot_RARProcessFile = GetFunction(RarLib, "RARProcessFileW") 
    CompilerEndIf 
    RARCloseArchive.Prot_RARCloseArchive = GetFunction(RarLib, "RARCloseArchive") 
    RARSetCallback.Prot_RARSetCallback = GetFunction(RarLib, "RARSetCallback") 
    RARSetChangeVolProc.Prot_RARSetChangeVolProc = GetFunction(RarLib, "RARSetChangeVolProc") 
    RARSetProcessDataProc.Prot_RARSetProcessDataProc = GetFunction(RarLib, "RARSetProcessDataProc") 
    RARSetPassword.Prot_RARSetPassword = GetFunction(RarLib, "RARSetPassword") 
    RARGetDllVersion.Prot_RARGetDllVersion = GetFunction(RarLib, "RARGetDllVersion") 
  EndIf 
EndProcedure 

ProcedureDLL Rar_End() 
  If RarLib 
    CloseLibrary(RarLib) 
    RarLib=0 
  EndIf 
EndProcedure 

Procedure UnRar(File$) 
  CompilerIf #PB_Compiler_Unicode=0 
    rarheader.RARHeaderData 
    raropen.RAROpenArchiveData 
    raropen\ArcName= @File$ 
  CompilerElse 
    rarheader.RARHeaderDataEx 
    raropen.RAROpenArchiveDataEx 
    raropen\ArcNameW = @File$ 
  CompilerEndIf 
  raropen\CmtBuf = 0
  raropen\CmtBufSize = 0
  raropen\OpenMode=#RAR_OM_EXTRACT 
  hRAR=RAROpenArchive(@raropen) 
  file.s="" 
  filelist.s="" 
  If raropen\OpenResult 
    MessageRequester("Error","Could Not Open RAR File",#MB_ICONERROR) 
    ProcedureReturn
  EndIf
  While RARReadHeader(hRAR,@rarheader)=0
    CompilerIf #PB_Compiler_Unicode=0 
      file=PeekS(@rarheader\FileName) 
    CompilerElse 
      file=PeekS(@rarheader\FileNameW) 
    CompilerEndIf 
    Debug "File:"+file
    filelist+file+Chr(10) 
    If rarheader\flags & #RAR_HEADERFLAG_ENCRYPTED 
      ;Debug "#RAR_HEADERFLAG_ENCRYPTED"
      RARSetPassword(hRAR,"free")
      ;MessageRequester("Error","file is password protected",#MB_ICONERROR) 
    EndIf
    res=RARProcessFile(hRAR,#RAR_EXTRACT,"","C:\testrar\"+file) 
    Select res
      Case #ERAR_BAD_DATA
        Debug "File CRC error"
      Case #ERAR_BAD_ARCHIVE
        Debug "Volume is not valid RAR archive"
      Case #ERAR_UNKNOWN_FORMAT
        Debug "Unknown archive format"
      Case #ERAR_EOPEN
        Debug "Volume open error"
      Case #ERAR_ECREATE
        Debug "File create error"
      Case #ERAR_ECLOSE
        Debug "File close error"
      Case #ERAR_EREAD
        Debug "Read error"
      Case #ERAR_EWRITE
        Debug "Write error"
    EndSelect
  Wend
  If filelist
    MessageRequester("Files Extracted",filelist,#MB_ICONINFORMATION) 
  EndIf
  
  If RARCloseArchive(hRAR)=#ERAR_ECLOSE
    MessageRequester("RARCloseArchive","Archive close error",#MB_ICONINFORMATION) 
  EndIf
EndProcedure 

Rar_Init() 
RarFile$=OpenFileRequester("","","WinRar (*.rar)|*.rar",0) 

If RarFile$ 
  UnRar(RarFile$) 
EndIf
Last edited by ABBKlaus on Tue Feb 26, 2008 7:19 pm, edited 1 time in total.
Micko
Enthusiast
Enthusiast
Posts: 244
Joined: Thu May 24, 2007 7:36 pm
Location: Senegal
Contact:

Post by Micko »

hehe this is pretty cool ! :D
but for me it will take some times to understand this code. :lol:
Micko
Enthusiast
Enthusiast
Posts: 244
Joined: Thu May 24, 2007 7:36 pm
Location: Senegal
Contact:

check if file is password protected

Post by Micko »

just to check if file is password protected but in my program it run and just extract one file :shock: so here nothing :oops:

Code: Select all

;PB_unRAR - Paul Leischow, Sept.6, 2002 
;RAR Archive extractor that uses the free UNRAR.DLL 

#ERAR_END_ARCHIVE        = 10 
#ERAR_NO_MEMORY          = 11 
#ERAR_BAD_DATA           = 12 
#ERAR_BAD_ARCHIVE        = 13 
#ERAR_UNKNOWN_FORMAT     = 14 
#ERAR_EOPEN              = 15 
#ERAR_ECREATE            = 16 
#ERAR_ECLOSE             = 17 
#ERAR_EREAD              = 18 
#ERAR_EWRITE             = 19 
#ERAR_SMALL_BUF          = 20 
#ERAR_UNKNOWN            = 21 
#ERAR_MISSING_PASSWORD   = 22 

#RAR_HEADERFLAG_ENCRYPTED               = %00000100
#RAR_OM_LIST             = 0 
#RAR_OM_EXTRACT          = 1 
#RAR_OM_LIST_INCSPLIT    = 2 

#RAR_SKIP                = 0 
#RAR_TEST                = 1 
#RAR_EXTRACT             = 2 

#RAR_VOL_ASK             = 0 
#RAR_VOL_NOTIFY          = 1 

#RAR_DLL_VERSION         = 4 

Structure RARHeaderData 
  ArcName.b[260] 
  FileName.b[260] 
  Flags.l 
  PackSize.l 
  UnpSize.l 
  HostOS.l 
  FileCRC.l 
  FileTime.l 
  UnpVer.l 
  Method.l 
  FileAttr.l 
  *CmtBuf.l 
  CmtBufSize.l 
  CmtSize.l 
  CmtState.l 
EndStructure 

Structure RARHeaderDataEx 
  ArcName.b[1024] 
  ArcNameW.w[1024] 
  FileName.b[1024] 
  FileNameW.w[1024] 
  Flags.l 
  PackSize.l 
  PackSizeHigh.l 
  UnpSize.l 
  UnpSizeHigh.l 
  HostOS.l 
  FileCRC.l 
  FileTime.l 
  UnpVer.l 
  Method.l 
  FileAttr.l 
  *CmtBuf.l 
  CmtBufSize.l 
  CmtSize.l 
  CmtState.l 
  Reserved.l[1024] 
EndStructure 

Structure RAROpenArchiveData 
  *ArcName.l 
  OpenMode.l 
  OpenResult.l 
  *CmtBuf.l 
  CmtBufSize.l 
  CmtSize.l 
  CmtState.l 
EndStructure 

Structure RAROpenArchiveDataEx 
  *ArcName.l 
  *ArcNameW.l 
  OpenMode.l 
  OpenResult.l 
  *CmtBuf.l 
  CmtBufSize.l 
  CmtSize.l 
  CmtState.l 
  Flags.l 
  Reserved.l[32] 
EndStructure 

Global RarLib.l 
Global RAROpenArchive.l 
Global RARCloseArchive.l 
Global RARReadHeader.l 
Global RARProcessFile.l 
Global RARSetCallback.l 
Global RARSetChangeVolProc.l 
Global RARSetProcessDataProc.l 
Global RARSetPassword.l 
Global RARGetDllVersion.l 

Prototype.l Prot_RAROpenArchive(a.l) 
Prototype.l Prot_RARCloseArchive(a.l) 
Prototype.l Prot_RARReadHeader(a.l,b.l) 
CompilerIf #PB_Compiler_Unicode=0 
  Prototype.l Prot_RARProcessFile(a.l,b.l,c.p-ascii,d.p-ascii) 
CompilerElse 
  Prototype.l Prot_RARProcessFile(a.l,b.l,c.p-unicode,d.p-unicode) 
CompilerEndIf 
Prototype.l Prot_RARSetCallback(a.l,b.l,c.l) 
Prototype.l Prot_RARSetChangeVolProc(a.l,b.l) 
Prototype.l Prot_RARSetProcessDataProc(a.l,b.l) 
Prototype.l Prot_RARSetPassword(a.l,b.p-ascii) 
Prototype.l Prot_RARGetDllVersion() 

ProcedureDLL Rar_Init() 
  RarLib=OpenLibrary(#PB_Any,"unrar.dll") 
  If RarLib 
    CompilerIf #PB_Compiler_Unicode=0 
      RAROpenArchive.Prot_RAROpenArchive = GetFunction(RarLib, "RAROpenArchive") 
      RARReadHeader.Prot_RARReadHeader = GetFunction(RarLib, "RARReadHeader") 
      RARProcessFile.Prot_RARProcessFile = GetFunction(RarLib, "RARProcessFile") 
    CompilerElse 
      RAROpenArchive.Prot_RAROpenArchive = GetFunction(RarLib, "RAROpenArchiveEx") 
      RARReadHeader.Prot_RARReadHeader = GetFunction(RarLib, "RARReadHeaderEx") 
      RARProcessFile.Prot_RARProcessFile = GetFunction(RarLib, "RARProcessFileW") 
    CompilerEndIf 
    RARCloseArchive.Prot_RARCloseArchive = GetFunction(RarLib, "RARCloseArchive") 
    RARSetCallback.Prot_RARSetCallback = GetFunction(RarLib, "RARSetCallback") 
    RARSetChangeVolProc.Prot_RARSetChangeVolProc = GetFunction(RarLib, "RARSetChangeVolProc") 
    RARSetProcessDataProc.Prot_RARSetProcessDataProc = GetFunction(RarLib, "RARSetProcessDataProc") 
    RARSetPassword.Prot_RARSetPassword = GetFunction(RarLib, "RARSetPassword") 
    RARGetDllVersion.Prot_RARGetDllVersion = GetFunction(RarLib, "RARGetDllVersion") 
  EndIf 
EndProcedure 

ProcedureDLL Rar_End() 
  If RarLib 
    CloseLibrary(RarLib) 
    RarLib=0 
  EndIf 
EndProcedure 

Procedure UnRar(File$) 
  CompilerIf #PB_Compiler_Unicode=0 
    rarheader.RARHeaderData 
    raropen.RAROpenArchiveData 
    raropen\ArcName= @File$ 
  CompilerElse 
    rarheader.RARHeaderDataEx 
    raropen.RAROpenArchiveDataEx 
    raropen\ArcNameW = @File$ 
  CompilerEndIf 
  raropen\CmtBuf = AllocateMemory(16384) 
  raropen\CmtBufSize = 16384 
  raropen\OpenMode=#RAR_OM_EXTRACT 
  hRAR=RAROpenArchive(@raropen) 
  Debug hRAR 
  file.s="" 
  filelist.s="" 
  stat=RARReadHeader(hRAR,@rarheader);without this line,can't check file header
  ;and no file extract after 
  If raropen\OpenResult 
    MessageRequester("Error","Could Not Open RAR File",#MB_ICONERROR) 
    
  ElseIf rarheader\flags & #RAR_HEADERFLAG_ENCRYPTED
    ;MessageRequester("Error","file is password protected",#MB_ICONERROR)
  ;Else        
    Repeat 
      stat=RARReadHeader(hRAR,@rarheader); 
      If stat=0 
        CompilerIf #PB_Compiler_Unicode=0 
          file=PeekS(@rarheader\FileName) 
        CompilerElse 
          file=PeekS(@rarheader\FileNameW) 
        CompilerEndIf 
        filelist+file+Chr(10) 
        RARSetPassword(hRAR,"free")
        res=RARProcessFile(hRAR,#RAR_EXTRACT,"","C:\testrar\"+file) 
      EndIf 
    Until stat<>0 
    MessageRequester("Files Extracted",filelist,#MB_ICONINFORMATION) 
  EndIf 
  
  RARCloseArchive(hRAR) 
EndProcedure 

Rar_Init() 
RarFile$=OpenFileRequester("","C:\","WinRar (*.rar)|*.rar",0) 

If RarFile$ 
  UnRar(RarFile$) 
EndIf
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Re: check if file is password protected

Post by ABBKlaus »

Micko wrote:just to check if file is password protected but in my program it run and just extract one file :shock: so here nothing :oops:
Changed my above example, it should work now :wink:
Post Reply