dssec.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _INC_DSSEC
  7. #define _INC_DSSEC
  8. #include <aclui.h>
  9. #if (_WIN32_WINNT >= 0x0600)
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. typedef HRESULT (WINAPI *PFNREADOBJECTSECURITY)(
  14. LPCWSTR, // Active Directory path of object
  15. SECURITY_INFORMATION, // the security information to read
  16. PSECURITY_DESCRIPTOR*, // the returned security descriptor
  17. LPARAM // context parameter
  18. );
  19. typedef HRESULT (WINAPI *PFNWRITEOBJECTSECURITY)(
  20. LPCWSTR, // Active Directory path of object
  21. SECURITY_INFORMATION, // the security information to write
  22. PSECURITY_DESCRIPTOR, // the security descriptor to write
  23. LPARAM // context parameter
  24. );
  25. #define DSSI_READ_ONLY 0x00000001
  26. #define DSSI_NO_ACCESS_CHECK 0x00000002
  27. #define DSSI_NO_EDIT_SACL 0x00000004
  28. #define DSSI_NO_EDIT_OWNER 0x00000008
  29. #define DSSI_IS_ROOT 0x00000010
  30. #define DSSI_NO_FILTER 0x00000020
  31. #define DSSI_NO_READONLY_MESSAGE 0x00000040
  32. HRESULT WINAPI DSCreateISecurityInfoObject(
  33. LPCWSTR pwszObjectPath,
  34. LPCWSTR pwszObjectClass,
  35. DWORD dwFlags,
  36. LPSECURITYINFO *ppSI,
  37. PFNREADOBJECTSECURITY pfnReadSD,
  38. PFNWRITEOBJECTSECURITY pfnWriteSD,
  39. LPARAM lpContext
  40. );
  41. HRESULT WINAPI DSCreateISecurityInfoObjectEx(
  42. LPCWSTR pwszObjectPath,
  43. LPCWSTR pwszObjectClass,
  44. LPCWSTR pwszServer,
  45. LPCWSTR pwszUserName,
  46. LPCWSTR pwszPassword,
  47. DWORD dwFlags,
  48. LPSECURITYINFO *ppSI,
  49. PFNREADOBJECTSECURITY pfnReadSD,
  50. PFNWRITEOBJECTSECURITY pfnWriteSD,
  51. LPARAM lpContext
  52. );
  53. HRESULT WINAPI DSEditSecurity(
  54. HWND hwndOwner,
  55. LPCWSTR pwszObjectPath,
  56. LPCWSTR pwszObjectClass,
  57. DWORD dwFlags,
  58. LPCWSTR *pwszCaption,
  59. PFNREADOBJECTSECURITY pfnReadSD,
  60. PFNWRITEOBJECTSECURITY pfnWriteSD,
  61. LPARAM lpContext
  62. );
  63. #ifdef __cplusplus
  64. }
  65. #endif
  66. #endif /*(_WIN32_WINNT >= 0x0600)*/
  67. #endif /*_INC_DSSEC*/