I was playing around with this SetFileAttributes API, as I have a requirement here to create hidden files from a web-app.

And I was trying to make it to fail (on purpose) , just to test the error reporting in webapp when (by some unexpected reason of course) it fails in real-life (I know it's just a matter of time...)

Anyway.. per the api doc, there are several attributes that this function does not work.. like compressed, or directory attributes.

But, even calling the function with them, it always returns non-zero (which is successful) . I was expecting it to fail... but ...

External_Function fsSetFileAttributes "SetFileAttributesW" kernel32.dll ; 
    WString sFile ;            // filename
    DWord dwFileAttributes ;   // File attributes
    Returns Integer 


Move (fsSetFileAttributes(sFileName, FILE_ATTRIBUTE_ENCRYPTED )) to iRet     <<---  iRet always return 1 (success)
Thoughts ?

Thanks in advance