如何在Windows平台VS2008上使用c语言从rar / zip文件打开和读取文本文件? [英] How to open and read text file from rar/zip file using c language only on windows platform VS2008?

查看:281
本文介绍了如何在Windows平台VS2008上使用c语言从rar / zip文件打开和读取文本文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从rar / zip文件中读取文本文件,但无法这样做,我尝试了三种方法,但似乎没有一种方法可行。首先,我尝试使用此链接提供的库http://www.unrarlib.org/download/unrarlib040.exe。 
这是一个2002年编写的代码所以不支持最新的存档文件,第二次我尝试使用7-zip网站提供的代码用于windows,但是当我尝试检索内容时,这也无法正常工作并抛出错误rar文件,然后我尝试用C代码打开和读取文件,这也导致不读取存档文件中的文本文件。所以,请指导我,以实现它..提供一些有用的链接或步骤,即指导这样做??

感谢您提前的帮助。

解决方案

项目unrarlib处于非活动状态。不要使用它,使用任何其他替代品。请使用7-zip,因为它支持RAR文件。还要检查RAR文件中是否没有错误。访问此页面:

http://www.example-code.com/vcpp/ rar_unrar.asp [ ^ ]

I am trying to read text files from a rar/zip file but unable to do so, I have tried with three approaches but none of them seems to work. First i tried to use the library available from this link http://www.unrarlib.org/download/unrarlib040.exe . 
It's a code written in 2002 so does not support latest archive files, second I tried with the code available from 7-zip website for windows, but that also not works and throwing an error when i try to retrieve the contents of rar files and then i tried with C code to open and read files that also results in not reading the text files inside archive files.So , please guide me in order to achieve it..provide some useful links or steps i.e guidance to do so??

Thanks for your help in advance.

解决方案

The project unrarlib is inactive. Don't use it, use any othe alternatives. Use 7-zip instead as it supports RAR files. Also check whether there is no error in the RAR File. Visit this page:
http://www.example-code.com/vcpp/rar_unrar.asp[^]


这篇关于如何在Windows平台VS2008上使用c语言从rar / zip文件打开和读取文本文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆