From: FrodoH on
On Oct 8, 6:56 am, lolguy <tbgra...(a)gmail.com> wrote:
> hey i m wondering if a person could detect a hidden file then if its
> hidden then remove hidden attribute for it and delete file
> is there a function for detecting hidden file and removing there
> attributes?

GetFileAttributes(...) returns DWORD that you can compare against
FILE_ATTRIBUTE_HIDDEN. You can turn off hidden file type using
SetFileAttributes()...

DWORD attributes = GetFileAttributes(fileName);
attributes &= ~FILE_ATTRIBUTE_HIDDEN;
SetFileAttributes(fileName, attributes);