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 
14 typedef HRESULT (WINAPI *PFNREADOBJECTSECURITY)(
15     LPCWSTR,               // Active Directory path of object
16     SECURITY_INFORMATION,  // the security information to read
17     PSECURITY_DESCRIPTOR*, // the returned security descriptor
18     LPARAM                 // context parameter
19 );
20 
21 typedef HRESULT (WINAPI *PFNWRITEOBJECTSECURITY)(
22     LPCWSTR,              // Active Directory path of object
23     SECURITY_INFORMATION, // the security information to write
24     PSECURITY_DESCRIPTOR, // the security descriptor to write
25     LPARAM                // context parameter
26 );
27 
28 #define DSSI_READ_ONLY 0x00000001
29 #define DSSI_NO_ACCESS_CHECK  0x00000002
30 #define DSSI_NO_EDIT_SACL  0x00000004
31 #define DSSI_NO_EDIT_OWNER  0x00000008
32 #define DSSI_IS_ROOT  0x00000010
33 #define DSSI_NO_FILTER  0x00000020
34 #define DSSI_NO_READONLY_MESSAGE  0x00000040
35 
36 HRESULT WINAPI DSCreateISecurityInfoObject(
37   LPCWSTR pwszObjectPath,
38   LPCWSTR pwszObjectClass,
39   DWORD dwFlags,
40   LPSECURITYINFO *ppSI,
41   PFNREADOBJECTSECURITY pfnReadSD,
42   PFNWRITEOBJECTSECURITY pfnWriteSD,
43   LPARAM lpContext
44 );
45 
46 HRESULT WINAPI DSCreateISecurityInfoObjectEx(
47   LPCWSTR pwszObjectPath,
48   LPCWSTR pwszObjectClass,
49   LPCWSTR pwszServer,
50   LPCWSTR pwszUserName,
51   LPCWSTR pwszPassword,
52   DWORD dwFlags,
53   LPSECURITYINFO *ppSI,
54   PFNREADOBJECTSECURITY pfnReadSD,
55   PFNWRITEOBJECTSECURITY pfnWriteSD,
56   LPARAM lpContext
57 );
58 
59 HRESULT WINAPI DSEditSecurity(
60   HWND hwndOwner,
61   LPCWSTR pwszObjectPath,
62   LPCWSTR pwszObjectClass,
63   DWORD dwFlags,
64   LPCWSTR *pwszCaption,
65   PFNREADOBJECTSECURITY pfnReadSD,
66   PFNWRITEOBJECTSECURITY pfnWriteSD,
67   LPARAM lpContext
68 );
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 #endif /*(_WIN32_WINNT >= 0x0600)*/
74 #endif /*_INC_DSSEC*/
75