[C#] MRS Packer/Unpacker Dll?

Results 1 to 12 of 12
  1. #1
    Apprentice Wo1f is offline
    MemberRank
    Jan 2008 Join Date
    9Posts

    [C#] MRS Packer/Unpacker Dll?

    I am making a program in C#, it will have to be able to pack and unpack .MRS files. I know I could just have MRS.exe and zlib.dll as embedded resources and unpack them and execute them, but that would make my program larger as well as making it harder to deal with(Since I will have to check for when the Mrs.exe process ends, then do what I need once it's done).

    I am guessing that zlib.dll has the functions for Packing/Unpacking MRS files. If it does, then can someone tell me how I can acess those functions using DllImport and if it isn't then can someone give me the dll to pack/unpack and tell me how to access the functions?


  2. #2
    WowIwasSuperCringeB4 XZeenon is offline
    MemberRank
    Jun 2008 Join Date
    CanadaLocation
    1,405Posts

    re: [C#] MRS Packer/Unpacker Dll?

    you could make the embed resources be executed and not have to have the resources extracted.

  3. #3
    Apprentice Wo1f is offline
    MemberRank
    Jan 2008 Join Date
    9Posts

    re: [C#] MRS Packer/Unpacker Dll?

    That's the thing. I don't know how to do it. Could you give me an example of how to execute it without extracting the file?

  4. #4
    WowIwasSuperCringeB4 XZeenon is offline
    MemberRank
    Jun 2008 Join Date
    CanadaLocation
    1,405Posts

    re: [C#] MRS Packer/Unpacker Dll?

    Well, I tried that aswell and never found a solution. SoZ Bud

  5. #5
    Apprentice Wo1f is offline
    MemberRank
    Jan 2008 Join Date
    9Posts

    re: [C#] MRS Packer/Unpacker Dll?

    Then do you know how to access the zlib.dll functions? That would be easy, since I could just pack it with my exe.

  6. #6
    The End Of The World~~ Night2Dark2 is offline
    MemberRank
    Feb 2007 Join Date
    Inside a box.Location
    259Posts

    re: [C#] MRS Packer/Unpacker Dll?

    This should have been posted in the Coders Paradise section. please relocate the thread to that section.

    You are lucky I am not a moderator :] else you would have gotten a warning.

    Some mod lock this thread or relocate it. thank you.

  7. #7
    The beer?? Its here !!! Rotana is offline
    MemberRank
    Jan 2007 Join Date
    The NetherlandsLocation
    1,733Posts

    re: [C#] MRS Packer/Unpacker Dll?

    Quote Originally Posted by Night2Dark2 View Post
    This should have been posted in the Coders Paradise section. please relocate the thread to that section.

    You are lucky I am not a moderator :] else you would have gotten a warning.

    Some mod lock this thread or relocate it. thank you.
    Agree on that, but this thread is also Gunz related, because its about mrs compression/decompresion.

    Moved.

  8. #8
    The End Of The World~~ Night2Dark2 is offline
    MemberRank
    Feb 2007 Join Date
    Inside a box.Location
    259Posts

    Re: [C#] MRS Packer/Unpacker Dll?

    true but it mainly relates to coding :]

  9. #9
    Apprentice Wo1f is offline
    MemberRank
    Jan 2008 Join Date
    9Posts

    Re: [C#] MRS Packer/Unpacker Dll?

    Alright, whatever section this belongs in: Is there a way to execute a byte array(an embedded resource) as a program without writing it onto disk? I just need it to execute 100% from variable memory. An MRS packer/unpacker isn't the only thing I need to run without it being written to disk now.

  10. #10
    WowIwasSuperCringeB4 XZeenon is offline
    MemberRank
    Jun 2008 Join Date
    CanadaLocation
    1,405Posts

    Re: [C#] MRS Packer/Unpacker Dll?

    Mm I know how to do it for visual basic...

    Code:
    Dim data() As Byte = My.Resources.FILENAME   
      
    Dim file As New System.IO.FileStream("Nameofyourchoice.exe", IO.FileMode.Create)   
      
    file.Write(data, 0, data.Length)   
      
    file.Close()   
      
    ' Run the my.resources.filename program as Nameofyourchoice.exe   
      
    Dim p As New Process   
      
    p.StartInfo.FileName = "nameofyourchoice.exe "  
      
    p.Start()
    soz maybe you can try modifying it to work on C#

  11. #11
    Apprentice Wo1f is offline
    MemberRank
    Jan 2008 Join Date
    9Posts

    Re: [C#] MRS Packer/Unpacker Dll?

    Thanks for trying, but that is the kind of thing I was trying to prevent. I don't want to write it to a file THEN execute, I need it to be executed without being written to disk.

  12. #12
    The End Of The World~~ Night2Dark2 is offline
    MemberRank
    Feb 2007 Join Date
    Inside a box.Location
    259Posts

    Re: [C#] MRS Packer/Unpacker Dll?

    Just write to a temp file... and then delete it Wo1f.

    Hold on Im going to translate the thing that you want into C++.



Advertisement