Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programmatically set security for folders and files.
Message
De
20/01/2001 03:46:11
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00465917
Message ID:
00466126
Vues:
10
>Hi,
>
>Anyone used GetFileSecurity and SetFileSecurity etc. API's in VFP to
>programmatically set security for folders and files? I found how to use
>above function in VB and C but no info for VFP.
>
>Q102102 HOWTO: Add an Access-Allowed ACE to a File (C)
>Q194757 HOWTO: Add an Access-Allowed ACE to a File Through Visual Basic
>Q240176 - HOWTO: Set Security on a NTFS Folder Programmatically
>
>At least Ed Rauh and Rick Strahl had a conversation about above - any chance that it's done already with VFP?

Your best bet is to use the ADSI ActiveX interface to do this. I use wrappers written in C to access low-level security-related APIs, which I would then call from VFP. You could take the example VB or VC++ code and create an in-process COM server to expose the interface to VFP via COM and follow the examples in the KB to implement the functionality you'd want.

The process of managing shares from Win9x and WinNT/2K is different, so you'd want to explore both sets of functions.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform