GetFileAttributes Problem Windows XP

  • Thread starter Thread starter JK
  • Start date Start date
J

JK

I am using a Visual C++ 6.0 application which calls GetFileAttributes
API. The API call seems to be returning different results in win2k
professional and win XP.

If i call GetFileAttributes API with a folder which is read only, win2k
identifes the read only folder correctly. But win XP says it is not a
read only folder.

The following snippet is not working in win XP

if ((Attribute=GetFileAttributes(TmpPath)) != 0xffffffff) {

if (Attribute & FILE_ATTRIBUTE_DIRECTORY) {

if (Attribute & FILE_ATTRIBUTE_READONLY )
{
Result = ErrorResult;
}
}
else
{
Result = ErrorResult;
}


Kindly help me to solve this problem
 
That's a rather Basic question but I think I C what you mean . . .


"David Candy" <.> wrote in message
And why would you do that for a C program.

--
 
You'd need to change the first "Result = ErrorResult;" to return a positive
result.

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top