class Program
{
static void Main(string[] args)
{
string dllPath = @"Z:\UnRARDLL\unrar.dll";
string arcFilePath = @"C:\WORK\myfile.rar";
string folderPath = @"Z:\rarExtractText";
//unrar.dllをロードする
UnRarDllMgr rarMgr = new UnRarDllMgr();
bool isOK = rarMgr.LoadModule(dllPath);
//書庫内ファイルの一覧を取得する
RARHeaderDataEx[] fileList = rarMgr.GetFileList(arcFilePath);
//書庫内ファイルを解凍する
string targetEntryPath = fileList[0].FileNameW;
isOK = rarMgr.FileExtractToFolder(arcFilePath, targetEntryPath, folderPath);
//unrar.dllを開放する
rarMgr.UnloadModule();
}
}