locked
Extract a cabinet file in metro style app. RRS feed

  • Question

  • Hi all,

    I have a C++ application which uses .Cab file, in my origin C++ application, i used FDI*** methods to extract those .cab file. Now i want to import all of them into Metro and create a Metro copy of my app, but i cannot find the equivalent methods in Metro. Can somebody tell me what methods i can use in the place of FDI*** methods?

    Thanks,

    Thursday, May 17, 2012 5:14 PM

Answers

  • There isn't a CAB file extraction API for Metro style apps.

    CAB and Zip are different formats. Depending on the specific file they may or may not use the same compression algorithm, but with different packaging.

    The only compression API provided in WinRT is Windows::System::Compression. .Net apps can use System.IO.Compression as well. Neither of these provide CAB support.

    --Rob

    Thursday, May 24, 2012 3:39 PM
    Moderator

All replies

  • Isn't CAB just a ZIP file?
    http://msdn.microsoft.com/en-us/library/windows/apps/system.io.compression.ziparchive(v=vs.110).aspx

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    Thursday, May 17, 2012 7:23 PM
    Moderator
  • I've tried but it does work in my case. I think it is because the CAB uses different compressing algorithm from the ZIP one.

    Thursday, May 17, 2012 9:24 PM
  • You might be able to use some of the same c++ functions in a dll you can call from c#.  I think you should ask over on the c++ forum about doing this.


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    Wednesday, May 23, 2012 4:10 PM
    Moderator
  • There isn't a CAB file extraction API for Metro style apps.

    CAB and Zip are different formats. Depending on the specific file they may or may not use the same compression algorithm, but with different packaging.

    The only compression API provided in WinRT is Windows::System::Compression. .Net apps can use System.IO.Compression as well. Neither of these provide CAB support.

    --Rob

    Thursday, May 24, 2012 3:39 PM
    Moderator