PDA

View Full Version : SetFileInfo



NewsArchive
12-11-2001, 01:00 AM
Hi,

Calling SetFileInfo() on a directory I created using CreateDirectory()
doesn't seem to set the file attributes.

Heres the code .....

// begin code
CreateDir(szSomePath);

nType = FILE_ATTRIBUTE;
nAttribute = FILE_ATTR_SYSTEM | FILE_ATTR_READONLY;
szValue = "";

SetFileInfo (szSomePath, nType, nAttribute, szValue);

// end code

When I check the resulting folder neither of the file attributes I've set
have been applied.

Can anyone help?

regards,
C.

NewsArchive
12-11-2001, 01:00 AM
I tried it an it seems to work fine for me. What OS are you running it on?
What is szSomePath set to?

--
Martin
InstallShield Software Corp.

"coriordan" <coriordan@fileflow.com> wrote in message
news:3c163381@news.installshield.com...
> Hi,
>
> Calling SetFileInfo() on a directory I created using CreateDirectory()
> doesn't seem to set the file attributes.
>
> Heres the code .....
>
> // begin code
> CreateDir(szSomePath);
>
> nType = FILE_ATTRIBUTE;
> nAttribute = FILE_ATTR_SYSTEM | FILE_ATTR_READONLY;
> szValue = "";
>
> SetFileInfo (szSomePath, nType, nAttribute, szValue);
>
> // end code
>
> When I check the resulting folder neither of the file attributes I've set
> have been applied.
>
> Can anyone help?
>
> regards,
> C.
>
>