Skip to content

Commit

Permalink
Support unrar64.dll
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberbeing authored and x-xy-y committed Nov 19, 2012
1 parent 1218890 commit 48eecca
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/subtitles/VobSubFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -688,19 +688,20 @@ static int PASCAL MyProcessDataProc(unsigned char* Addr, int Size)

bool CVobSubFile::ReadRar(CString fn)
{
HMODULE h = LoadLibrary(_T("unrar.dll"));
#ifdef _WIN64
HMODULE h = LoadLibrary(_T("unrar64.dll"));
#else
HMODULE h = LoadLibrary(_T("unrar.dll"));
#endif
if(!h) return(false);

RAROpenArchiveEx OpenArchiveEx = (RAROpenArchiveEx)GetProcAddress(h, "RAROpenArchiveEx");
RARCloseArchive CloseArchive = (RARCloseArchive)GetProcAddress(h, "RARCloseArchive");
RARReadHeaderEx ReadHeaderEx = (RARReadHeaderEx)GetProcAddress(h, "RARReadHeaderEx");
RARProcessFile ProcessFile = (RARProcessFile)GetProcAddress(h, "RARProcessFile");
RARSetChangeVolProc SetChangeVolProc = (RARSetChangeVolProc)GetProcAddress(h, "RARSetChangeVolProc");
RARSetProcessDataProc SetProcessDataProc = (RARSetProcessDataProc)GetProcAddress(h, "RARSetProcessDataProc");
RARSetPassword SetPassword = (RARSetPassword)GetProcAddress(h, "RARSetPassword");

if(!(OpenArchiveEx && CloseArchive && ReadHeaderEx && ProcessFile
&& SetChangeVolProc && SetProcessDataProc && SetPassword))
if(!(OpenArchiveEx && CloseArchive && ReadHeaderEx && ProcessFile && SetProcessDataProc))
{
FreeLibrary(h);
return(false);
Expand Down

0 comments on commit 48eecca

Please sign in to comment.