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.

--
 
Back
Top