How to use XZ utils from C#

SvenG
2012-05-16
2013-05-30
  • SvenG
    SvenG
    2012-05-16

    Hi there,

    I am having a real hard time getting the XZutils to run from C# program via DLLImport.
    I'm not a C/C++ developer so I am struggling here atm on how to do this.

    Is here anybody out there how has done something similar? Or do you know of tutorials/tips that show how I could accomplish that?

    Thank you so much

    Sven

     
  • Lasse Collin
    Lasse Collin
    2012-05-18

    I don't know much more about Windows programming than what I have learned when porting XZ Utils. The only thing that pops into my mind is that the functions in liblzma.dll use the cdecl calling convention. You may need to specify that when loading liblzma.dll from C#.

    I think there is a port of XZ to pure C# but I don't have a link at hand.