VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Set File atrributes using SetFileAttributes API

by Karthikeyan (187 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 1st August 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Set File atrributes using SetFileAttributes API

API Declarations


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


Rate Set File atrributes using SetFileAttributes API



Dim attr As Long
Dim rval As Long
attr = READONLY + SYSTEM + HIDDEN
rval = SetFileAttributes("C:\karthik\waste.txt", attr)
End
End Sub

Download this snippet    Add to My Saved Code

Set File atrributes using SetFileAttributes API Comments

No comments have been posted about Set File atrributes using SetFileAttributes API. Why not be the first to post a comment about Set File atrributes using SetFileAttributes API.

Post your comment

Subject:
Message:
0/1000 characters