home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.rarlab.com
/
2014.05.ftp.rarlab.com.tar
/
ftp.rarlab.com
/
rar
/
UnrarGUI.zip
/
UnrarDll.h
< prev
next >
Wrap
C/C++ Source or Header
|
2003-12-29
|
2KB
|
56 lines
//---------------------------------------------------------------------------
#ifndef UnrarDllH
#define UnrarDllH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include "DLLMan.h"
//---------------------------------------------------------------------------
/*
Question about this library <zhangihome@netscape.net>
Example:
if ( OpenDialog->Execute() ) {
RarDll *rar = new RarDll();
char *err = rar->GUI(OpenDialog->FileName.c_str());
if (err) {
MessageBox(NULL, err, "Load fail.", MB_OK);
} else {
RichEdit->Lines->LoadFromStream(rar->Expanded);
}
// Do something if you use the rar->FileName.
delete rar;
}
*/
class RarDll : public DLLMan {
public:
// Pop up a message box with a OK button.
void Comment(char *Content, char *Caption);
bool Ask;
// Pop up window Ask password and next volume when need.
// On startup, Ask = Popup;
RarDll(bool Popup = true);
~RarDll();
// Return null if succeed, or a message for what error.
// Same for List() and GUI() return.
char *Extract(char *PakName, char *AskName, char *Passw = "");
TMemoryStream *Expanded;
// Get files list in package.
char *List(char *PakName);
// Files->Objects[Index] is a number of file size(not pointer).
// Files->Strings[Index] is a string of file name.
TStringList *Files;
// GUI show a package view window. if a file has be picked.
// return Extract(ThePackage, TheFile).
char *GUI(char *PakName, bool Detail = false);
AnsiString FileName;
};
typedef RarDll * RarDllP;
#endif