Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
If drive(volume) supports persistent security? Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
Checks if Volume supports persistent ACLs 23-Jul-04
Category
Files Operation
Language
Delphi 7.x
Views
354
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
Atanasov, Marin
Reference URL:
			1   
2   (*   Combination with function that checks if OS is NT-based can by used to
3      detect if volume is NTFS. 
4   
5    >> Note: To get proper info about any volume you must have at least read access
6      to it even it is a sharing(e.g.\\myserver\MyShare ) or exact path (e.g. C:\)
7   
8   *)
9   ....... 
10  /* uses SysUtils, Windows */
11  ......
12  
13  //The function supports UNC paths
14  //Example aPath values:
15  //    C:\
16  //    C:\Program Files\MyInstallationFolder
17  //    C:\Program Files\MyInstallationFolder\
18  //    \\myserver\c$\
19  //    \\myserver\MyShare
20  function VolumeSupportsPersistentACLs( aPath : string) : Boolean;
21  var
22    maxClen,
23    driveFlags : Cardinal;
24    VolName, FSysName : array[0..MAX_PATH] of Char;
25  begin
26    aPath := ExtractFileDrive( aPath) +'\';
27    Result := FALSE;
28    if GetVolumeInformation(
29       PChar( aPath),
30       VolName,
31       SizeOf( VolName),
32       nil,
33       maxClen,
34       driveFlags,
35       FsysName,
36       SizeOf( FsysName)
37    ) then
38      Result := driveFlags and FS_PERSISTENT_ACLS = FS_PERSISTENT_ACLS ;
39  end;
40  


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC