Like Tree8Likes

How to Extract .RAR files with C++

This is a discussion on How to Extract .RAR files with C++ within the C++ Programming forums, part of the General Programming Boards category; Hi guys. I want to write a C++ program to extract the .RAR files. I got the sources of unrar ...

  1. #1
    Registered User
    Join Date
    Mar 2012
    Posts
    29

    Arrow How to Extract .RAR files with C++

    Hi guys. I want to write a C++ program to extract the .RAR files. I got the sources of unrar from their official website WinRAR archiver, a powerful tool to process RAR and ZIP files but have no idea about their implementation in a C++ code.
    I never used a third party library in my programs. So I got the sources but have absolutely no idea on "HOW TO IMPLEMENT THEM IN A PROGRAM".
    So can anyone help me at least with a starting point..??
    Thanks in advance.

  2. #2
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,762
    I'd use something else personally, because as you know, unrar.dll is severely lacking in documentation. ZIP is an ISO standard.
    The closest thing I can find to documentation is this: unRAR.dll Manual - which is not official, so use at your own risk. Make sure that you download the unrar dll I highly doubt you will need anything else.

    Also, code smart. Read everything that comes with the dll download please.
    Linked_List likes this.

  3. #3
    Registered User
    Join Date
    Mar 2012
    Posts
    29
    Thanks again.
    Can you help me with a basic code that how to use/call the unrar.dll or any third part library in a C++ program.??
    Just need a very basic sample code to get started.

  4. #4
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,762
    Hmm, seems like there is a documentation folder in the dll download. I missed it earlier cause it's late...

    Can you help me with a basic code that how to use/call the unrar.dll or any third part library in a C++ program.??
    This might help: LoadLibrary function
    Linked_List likes this.

  5. #5
    Registered User
    Join Date
    Jun 2005
    Posts
    6,646
    You might want to clarify what you already know.

    In particular : What do you understand is the difference between a C and C++ program? What types of programs and libraries have you created?


    The reason for my first question is that different people mean different things when they talk about using (or adapting) C source in a C++ program. So plenty of people might give you answers that are perfectly correct, but actually confuse you further. The way you've asked your question suggests you are not thinking in the way that a lot of people do, when they think in terms of "implementation in a C++ code".

    The reason for my second question is that learning C and/or C++ programming is a gradual process, and using third party libraries (even more so, using libraries associated with "powerful tools" that - like WinRAR - are not known for being well documented) is not something you want to jump into too early. From the way you have phrased your question, I suspect you have jumped past several things that people expect you to know, if you are trying to use a third party library. So I'm concerned that people might give you answers that are completely correct, but will confuse you because they'll rely on things you haven't learned yet. Sort of like asking how to build the roof of a house, when you haven't even worked out how to lay down the ground floor or put up the walls.
    rogster001 likes this.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Sunshine, and read this, this, and this before posting again.

  6. #6
    Registered User
    Join Date
    Mar 2012
    Posts
    29
    @whiteflags..
    I'm on the move now.. Thanks bro..!!
    Last edited by Linked_List; 10-06-2012 at 04:28 AM.

  7. #7
    Registered User
    Join Date
    Mar 2012
    Posts
    29
    Quote Originally Posted by grumpy View Post
    You might want to clarify what you already know.

    In particular : What do you understand is the difference between a C and C++ program? What types of programs and libraries have you created?


    The reason for my first question is that different people mean different things when they talk about using (or adapting) C source in a C++ program. So plenty of people might give you answers that are perfectly correct, but actually confuse you further. The way you've asked your question suggests you are not thinking in the way that a lot of people do, when they think in terms of "implementation in a C++ code".

    The reason for my second question is that learning C and/or C++ programming is a gradual process, and using third party libraries (even more so, using libraries associated with "powerful tools" that - like WinRAR - are not known for being well documented) is not something you want to jump into too early. From the way you have phrased your question, I suspect you have jumped past several things that people expect you to know, if you are trying to use a third party library. So I'm concerned that people might give you answers that are completely correct, but will confuse you because they'll rely on things you haven't learned yet. Sort of like asking how to build the roof of a house, when you haven't even worked out how to lay down the ground floor or put up the walls.
    dude.. with due respect.. I know my capabilities.. and how to tackle my weak sections.. I'm not pretty good with phrasing questions so I always write them in a noobs way.. I always learn and implement the parts which are needed and skip the rest. This is the reason I lag with some very basics of programming, however I've also created my own tools like Keylogger and Ultimate Keygens in C++. Things are as simple as complicated with me.
    However, Thanks for you advice. I'll look forward to follow it in future.

  8. #8
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,415
    I've also created my own tools like Keylogger and Ultimate Keygens in C++.
    \/\/0\/\/. j00Z /\/\U57 b3 4|\| 1|\|(R3D1BL'/ 5|<1LL3D |-|4><0R3R \/\/17|-| 7RUL'/ /\/\4DD3|\|1|\|9 5|<1LL5. \/\/|-|'/, 1'D b3 5|-|0(|<3D 70 L34R|\| 7|-|3 j00Z |-|4\/3|\|'7 "0\/\/|\|3D b0><0R35", "PhR34|<3D b3LL5", 4|\|D "5L1D 1|\|70 UL71/\/\473 p0\/\/3R". 70 b3 |-|0|\|357, 1'/\/\ 1|\| 4\/\/3 0Ph j00R /\/\4j357'/. (R3471|\|9 4|\| "UL71/\/\473 |<3'/93|\|"? |-|0\/\/ d035 0|\|3 3\/3|\| 90 4B0U7 7|-|47?

    0|-|, bU7 j00Z d0|\|'7 |<|\|0\/\/ 50/\/\3 0Ph 7|-|3 \/3R'/ b451(5 0Ph pR09R4/\/\/\/\1|\|9. j00Z /\/\U57 b3 4 L3553R 90D!?

    (R4Z'/ /\/\07|-|3RPhU(|<1|\|9 pHRU17

  9. #9
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,415
    O_o

    It seems the filter can't handle the 1337.

    Apologies to those at work. ^_^;

    [Edit]
    By the by, I spent less than five minutes throwing API entry points at my search engine of choice and found two complete different, great examples.
    [/Edit]

    Soma
    Last edited by phantomotap; 10-06-2012 at 04:49 AM.
    Linked_List likes this.

  10. #10
    Registered User
    Join Date
    Mar 2012
    Posts
    29
    Quote Originally Posted by phantomotap View Post
    \/\/0\/\/. j00Z /\/\U57 b3 4|\| 1|\|(R3D1BL'/ 5|<1LL3D |-|4><0R3R \/\/17|-| 7RUL'/ /\/\4DD3|\|1|\|9 5|<1LL5. \/\/|-|'/, 1'D b3 5|-|0(|<3D 70 L34R|\| 7|-|3 j00Z |-|4\/3|\|'7 "0\/\/|\|3D b0><0R35", "PhR34|<3D b3LL5", 4|\|D "5L1D 1|\|70 UL71/\/\473 p0\/\/3R". 70 b3 |-|0|\|357, 1'/\/\ 1|\| 4\/\/3 0Ph j00R /\/\4j357'/. (R3471|\|9 4|\| "UL71/\/\473 |<3'/93|\|"? |-|0\/\/ d035 0|\|3 3\/3|\| 90 4B0U7 7|-|47?

    0|-|, bU7 j00Z d0|\|'7 |<|\|0\/\/ 50/\/\3 0Ph 7|-|3 \/3R'/ b451(5 0Ph pR09R4/\/\/\/\1|\|9. j00Z /\/\U57 b3 4 L3553R 90D!?

    (R4Z'/ /\/\07|-|3RPhU(|<1|\|9 pHRU17
    Looks cool. I'm sure you'll provide a documentation sooner. LOL

  11. #11
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,762
    Quote Originally Posted by phantomotap View Post
    O_o

    It seems the filter can't handle the 1337.

    Apologies to those at work. ^_^;

    Soma
    I really hope a program cranks that stuff out for you. when i was 12 the program was me...

  12. #12
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,415
    ^_^;

    I'll never tell.

    Soma

  13. #13
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,438
    what is that crazy stuff? i am intrigued!
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  14. #14
    Registered User
    Join Date
    Jun 2005
    Posts
    6,646
    Quote Originally Posted by Linked_List View Post
    dude.. with due respect.. I know my capabilities.. and how to tackle my weak sections.. I'm not pretty good with phrasing questions so I always write them in a noobs way..
    You may know your capabilities. We don't. Your question came across as one from someone with little experience asking about things well beyond your skill levels. Hence my response.

    Quote Originally Posted by Linked_List View Post
    I always learn and implement the parts which are needed and skip the rest.
    There comes a point where that approach to learning breaks down. And your question suggests you have reached a point where it has.

    Quote Originally Posted by Linked_List View Post
    This is the reason I lag with some very basics of programming, however I've also created my own tools like Keylogger and Ultimate Keygens in C++.
    Yeah, okay, you're a script kiddie. And you've confirmed my impression (inexperienced person asking question beyond his/her skills) because I know how easy such tools are to create.

    In future, I'll dumb down any answers I give you accordingly. Would you rather we use 1337?
    rags_to_riches likes this.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Sunshine, and read this, this, and this before posting again.

  15. #15
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,415
    O_o

    Careful.

    "1337" like "4chan" can drive a person to madness... also sparta.

    Soma ^_^

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to extract data from PDF files
    By charithf in forum C Programming
    Replies: 2
    Last Post: 01-24-2010, 08:36 PM
  2. How to extract a list of files in a specific directory?
    By Perspektyva in forum C++ Programming
    Replies: 4
    Last Post: 11-11-2008, 02:02 PM
  3. how to extract .rar files
    By munna_dude in forum Tech Board
    Replies: 1
    Last Post: 06-30-2007, 08:11 AM
  4. Can anyone extract the pic from this?
    By Nakeerb in forum Windows Programming
    Replies: 5
    Last Post: 01-19-2003, 10:20 AM
  5. Can you extract files from installation files?
    By compjinx in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 02-22-2002, 12:52 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21