|
Изменение атрибутов файла (GetFileAttributes) |
|
|
Изменение атрибутов файла с помощью API-функции SetFileAttributes Const READONLY = &H1
Const HIDDEN = &H2
Const SYSTEM = &H4
Const ARCHIVE = &H20
Const NORMAL = &H80
Private Declare Function SetFileAttributes Lib "kernel32.dll" Alias
"SetFileAttributesA" (ByVal lpFileName As String, ByVal dwFileAttributes As
Long) As Long
Private Sub Command1_Click()
Dim attr As Long
Dim rval As Long
attr = READONLY + SYSTEM + HIDDEN
rval = SetFileAttributes("D:\garbage\top_spylog.Txt", attr)
End
End Sub
|
|
|
|
|
|
|