Most recent edit on 2007-04-20 13:57:16 by ArchLineberger
Additions:
FileAttributes
Deletions:
Edited on 2007-04-20 13:55:01 by ArchLineberger
Additions:
To get the FileAttributes of a file you can do the following call:
Update v-DecimalAttributes = CallDLLS ('Kernel32.GetFileAttributesA','A4',v-Filename)
To set the FileAttributes of a file you can do the following call:
Update v-Result = CallDLLS ('Kernel32.SetFileAttributesA','A44',v-Filename,v-AttributesNumber)
Deletions:
To get the FileAttributes of a file you can do the following call:
Update v-DecimalAttributes = CallDLLS ('Kernel32.GetFileAttributesA','A4',v-Filename)
To set the FileAttributes of a file you can do the following call:
Update v-Result = CallDLLS ('Kernel32.SetFileAttributesA','A44',v-Filename,v-AttributesNumber)
Edited on 2007-04-03 18:24:12 by AndreasSedlmeier [CallDLL is wrong for Windows API; use CallDLLS instead]
Additions:
Update v-DecimalAttributes = CallDLLS ('Kernel32.GetFileAttributesA','A4',v-Filename)
Update v-Result = CallDLLS ('Kernel32.SetFileAttributesA','A44',v-Filename,v-AttributesNumber)
Deletions:
Update v-DecimalAttributes = CallDLL ('Kernel32.GetFileAttributesA','A4',v-Filename)
Update v-Result = CallDLL ('Kernel32.SetFileAttributesA','A44',v-Filename,v-AttributesNumber)
Edited on 2007-03-23 22:22:30 by FrankVanHerreweghe
Additions:
To set the FileAttributes of a file you can do the following call:
Update v-Result = CallDLL ('Kernel32.SetFileAttributesA','A44',v-Filename,v-AttributesNumber)
Edited on 2007-03-23 22:16:49 by FrankVanHerreweghe
Additions:
To get the FileAttributes of a file you can do the following call:
Update v-DecimalAttributes = CallDLL ('Kernel32.GetFileAttributesA','A4',v-Filename)
Edited on 2007-02-19 16:55:56 by ArchLineberger
Additions:
| DECIMAL |
HEXADECIMAL |
ATTRIBUTE |
| 0 |
00000000 |
Read-Write |
| 1 |
00000001 |
Read-Only |
| 2 |
00000010 |
Hidden |
| 4 |
00000100 |
System |
| 8 |
00001000 |
Volume Label |
| 16 |
00010000 |
Directory |
| 32 |
00100000 |
Archive |
Deletions:
0 00000000 Read-Write
1 00000001 Read-Only
2 00000010 Hidden
4 00000100 System
8 00001000 Volume Label
16 00010000 Directory
32 00100000 Archive
Edited on 2007-02-19 16:51:23 by ArchLineberger
Additions:
Several Kernel32 functions require specification or return of file attributes.
Deletions:
Several Kernel32 functions require specification or return of file attributes.
Oldest known version of this page was edited on 2007-02-19 16:49:35 by ArchLineberger []
Page view:
Several
Kernel32 functions require specification or return of file attributes.
The attributes are stored in a single byte, with each bit of the byte representing a specific attribute (actually, only six bits are used of the eight in the byte). Each bit that is set to a one means that the file has that attribute turned on. The following are the attributes and the bits they use in the attribute byte:
0 00000000 Read-Write
1 00000001 Read-Only
2 00000010 Hidden
4 00000100 System
8 00001000 Volume Label
16 00010000 Directory
32 00100000 Archive
The attribute bits are summed to form the attribute byte. So, the attribute byte for a hidden, read-only directory would be 00010011h or 19. To insure that you don't mistakenly change an attribute, you should get the current attribute byte, change the bits as desired, then set the attribute byte.