User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

change_fileattributes [2008/06/09 12:37] (current)
Line 1: Line 1:
 +====== Change file attributes ======
 +<​file>​This code snippet is originally from the former WinAPI site</​file>​
 +Sometimes you need to change the file attributes, e.g. if you want to delete a write-protected file. This function solves this problem:
 +<code c>#​include <​windows.h>​
 +SetFileAttributes (TEXT("​C:​\\filename.txt"​),​ FILE_ATTRIBUTE_NORMAL);</​code>​
 +The possible attributes can be found in the [[http://​​en-us/​library/​ms891925.aspx|MSDN]].
change_fileattributes.txt ยท Last modified: 2008/06/09 12:37 by christian