|
-
Aug 31st, 2010, 10:38 PM
#1
Thread Starter
Lively Member
Open a file from zip archive
ok if there is any way to open a file from zip archive without extracting it ?
-
Aug 31st, 2010, 10:51 PM
#2
Re: Open a file from zip archive
Hm... I don't think so.
Why wouldn't you want to extract it?
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Aug 31st, 2010, 10:57 PM
#3
Thread Starter
Lively Member
Re: Open a file from zip archive
 Originally Posted by weirddemon
Hm... I don't think so.
Why wouldn't you want to extract it?
if you see KMP ? it run video from a zip archive i want to do this with images exactly like window$
-
Aug 31st, 2010, 10:58 PM
#4
Re: Open a file from zip archive
That depends on exactly what you mean. You obviously have to extract the data from the archive to use it, but you don't necessarily have to save the extracted data as a file. That depends on how you want to use it. If you want to open it in an external application then you most likely will have to save it, because that application will need to read the data itself. If you want to, for instance, show the contents of an extracted text file in a TextBox in your own app then you won't need to save, because you've already got the file contents.
-
Sep 1st, 2010, 06:17 AM
#5
Thread Starter
Lively Member
Re: Open a file from zip archive
ok just tell me how windows read it without extracting any file
-
Sep 1st, 2010, 07:00 AM
#6
Re: Open a file from zip archive
Windows does extract it, you just don't see it.
VB6 Library
If I helped you then please help me and rate my post!
If you solved your problem, then please mark the post resolved
-
Sep 1st, 2010, 07:58 PM
#7
Re: Open a file from zip archive
Windows itself and lots of other applications will create files in your Temp directory in situations like this. You can do the same. Extract the data from the archive and then just use it as is if you don't need a file but, if you do need a file create one in the Temp directory and then delete it again afterwards. The .NET Framework even provides a specific mechanism for doing so. The IO.Path.GetTempFileName method will create an empty file in the Temp folder with a random name and return that name to you. You can then save your data to that file and then delete it again afterwards. There's no indication in the file name or location of what the file contains, so it's relatively anonymous. THAT is how Windows does it, that's how lots of applications do it and that's how you should do it too.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|