REF-040 - Harden External UnRAR DLL Loading¶
Summary¶
CRARFile now treats RARLAB UnRAR as an external user-installed dependency
instead of a bundled component. The loader no longer calls LoadLibrary with a
bare DLL name and no longer searches the process DLL path.
Decision¶
- Do not switch RAR extraction to
7z.dllfor Beta 0.7.3. - Do not bundle
UnRAR64.dllin eMule BB release packages. - Use the RARLAB UnRAR DLL installer layout:
- x64:
%ProgramFiles(x86)%\UnrarDLL\x64\UnRAR64.dll - Win32 fallback:
%ProgramFiles(x86)%\UnrarDLL\UnRAR.dll - Use the installed RARLAB header as the API reference:
%ProgramFiles(x86)%\UnrarDLL\unrar.h.
Outcome¶
CRARFileloads only an absolute installed UnRAR DLL candidate.- Runtime loading uses
LoadLibraryExwith safe DLL search flags. - The local UnRAR declarations were refreshed to the current API version 9 structure layout.
RARGetDllVersionis used when exported to reject DLLs below API version 9.- Required extraction exports remain:
RAROpenArchiveEx,RARCloseArchive,RARReadHeaderEx, andRARProcessFileW.
Acceptance¶
- [x] RAR support remains optional and user-installed.
- [x] Bare-name
LoadLibrary(UNRAR_DLL_NAME)is removed from activemain. - [x] Missing DLL diagnostics point users at the RARLAB install layout.
- [x] Native seam tests cover DLL naming, installed path construction, version policy, and required exports.