Menu

LZMA SDK: extracted dll/exe files has zero length

Help
Sergey
2014-03-29
2014-03-29
  • Sergey

    Sergey - 2014-03-29

    hi

    i'm creating application to extract data from 7z archive. i'm using API:
    CMyComPtr<IInArchive>::Extract(...) to extract files (of-course all required callback handles are created, most of them are empty & just return S_OK).

    so, issue is really strange: files with extensions exe & dll (may be another too) are newer writes: ISequentialOutStream::Write method is never called for such files. i tried to look for substrings 'exe' & 'dll' but without any success...

    but if i rename file (for example to *.txt) - such file is processed normally - it means that issue in file name (not in file content)

    could you point me to code where such logic is configured?

    thank you

    --Sergey

     
  • Sergey

    Sergey - 2014-03-29

    [Resolved]
    some analysis: used VS2010, SDK was compiled as static library and later linked into dll module. no sources changed (in fact used 'Alone' project, but changed destination object type: .exe->.lib)
    due to 'unknown' reasons all static register codecs and archive types was excluded from destination module by linker: it seems in case if static object has no external links (no object usage or method calls) - it is excluded by MS linker from target module

    solution: change REGISTER_CODEC[S] macro to create public function to register codecs & add call this function to any place of code

     

Log in to post a comment.