Solved

Working with ZIP files under Win XP

Posted on 2002-06-23
2
557 Views
Last Modified: 2013-12-03
Hi,

when I do the following:

...
SHFILEINFO shfi;
SHGetFileInfo("c:\file.zip", 0, &shfi, sizeof(SHFILEINFO), SHGFI_ATTRIBUTES);
if(shfi.dwAttributes & SFGAO_FOLDER)
{
 //I am getting here

...

In other words Win XP handles zip files as folders. How one can determine under Win XP if folder is a zip file without disabling XP's zip handler? I tried the following:

if(shfi.dwAttributes & SFGAO_FOLDER && !(shfi.dwAttributes & SFGAO_COMPRESSED)
...

but this does not work.

Any help will be greatly appreciated.
0
Comment
Question by:mnbmnb
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 100 total points
ID: 7102206
What about

if ( FILE_ATTRIBUTE_DIRECTORY & GetFileAttributes ( c:\\file.zip") {
//..
}
0
 

Author Comment

by:mnbmnb
ID: 7102290
Good idea. Works fine, thanks.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now