home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / sdktools / winnt / cacls / filesec.hxx < prev    next >
Text File  |  1995-03-13  |  1KB  |  55 lines

  1. //+-------------------------------------------------------------------
  2. //
  3. // Copyright (C) 1995, Microsoft Corporation.
  4. //
  5. //  File:        FILESEC.hxx
  6. //
  7. //  Contents:    class encapsulating file security.
  8. //
  9. //  Classes:     CFileSecurity
  10. //
  11. //  History:     Nov-93        Created         DaveMont
  12. //
  13. //--------------------------------------------------------------------
  14. #ifndef __FILESEC__
  15. #define __FILESEC__
  16.  
  17. #include <t2.hxx>
  18. #include <daclwrap.hxx>
  19.  
  20. //+-------------------------------------------------------------------
  21. //
  22. //  Class:      CFileSecurity
  23. //
  24. //  Purpose:    encapsulation of File security, this class wraps the
  25. //              NT security descriptor for a file, allowing application
  26. //              of a class that wraps DACLS to it, thus changing the
  27. //              acces control on the file.
  28. //
  29. //--------------------------------------------------------------------
  30. class CFileSecurity
  31. {
  32. public:
  33.  
  34.     CFileSecurity(WCHAR *filename);
  35.  
  36.    ~CFileSecurity();
  37.  
  38. ULONG Init();
  39.  
  40.     // methods to actually set the security on the file
  41.  
  42. ULONG SetFS(BOOL fmodify, CDaclWrap *pcdw, BOOL fdir);
  43.  
  44. private:
  45.  
  46.     BYTE       * _psd        ;
  47.     WCHAR      * _pwfilename ;
  48. };
  49.  
  50. #endif // __FILESEC__
  51.  
  52.  
  53.  
  54.  
  55.