2 * Copyright (C) 2003 Ulrich Czekalla for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 #define SDDL_REVISION_1 1
27 #define SDDL_REVISION SDDL_REVISION_1
29 #ifndef WINE_NO_UNICODE_MACROS
32 # define SDDL_OWNER "O"
33 # define SDDL_GROUP "G"
34 # define SDDL_DACL "D"
35 # define SDDL_SACL "S"
37 # if defined(__GNUC__)
38 # define SDDL_OWNER (const WCHAR[]){ 'O',0 }
39 # define SDDL_GROUP (const WCHAR[]){ 'G',0 }
40 # define SDDL_DACL (const WCHAR[]){ 'D',0 }
41 # define SDDL_SACL (const WCHAR[]){ 'S',0 }
42 # elif defined(_MSC_VER)
43 # define SDDL_OWNER L"O"
44 # define SDDL_GROUP L"G"
45 # define SDDL_DACL L"D"
46 # define SDDL_SACL L"S"
48 static const WCHAR SDDL_OWNER
[] = { 'O',0 };
49 static const WCHAR SDDL_GROUP
[] = { 'G',0 };
50 static const WCHAR SDDL_DACL
[] = { 'D',0 };
51 static const WCHAR SDDL_SACL
[] = { 'S',0 };
55 /* Separators as characters */
56 /* SDDL_SEPERATORC is not a typo, as per Microsoft's headers */
58 # define SDDL_SEPERATORC ';'
59 # define SDDL_DELIMINATORC ':'
60 # define SDDL_ACE_BEGINC '('
61 # define SDDL_ACE_ENDC ')'
63 # define SDDL_SEPERATORC ((WCHAR)';')
64 # define SDDL_DELIMINATORC ((WCHAR)':')
65 # define SDDL_ACE_BEGINC ((WCHAR)'(')
66 # define SDDL_ACE_ENDC ((WCHAR)')')
69 /* Separators as strings */
70 /* SDDL_SEPERATOR is not a typo, as per Microsoft's headers */
72 # define SDDL_SEPERATOR ";"
73 # define SDDL_DELIMINATOR ":"
74 # define SDDL_ACE_BEGIN "("
75 # define SDDL_ACE_END ")"
77 # if defined(__GNUC__)
78 # define SDDL_SEPERATOR (const WCHAR[]){ ';',0 }
79 # define SDDL_DELIMINATOR (const WCHAR[]){ ':',0 }
80 # define SDDL_ACE_BEGIN (const WCHAR[]){ '(',0 }
81 # define SDDL_ACE_END (const WCHAR[]){ ')',0 }
82 # elif defined(_MSC_VER)
83 # define SDDL_SEPERATOR L";"
84 # define SDDL_DELIMINATOR L":"
85 # define SDDL_ACE_BEGIN L"("
86 # define SDDL_ACE_END L")"
88 static const WCHAR SDDL_SEPERATOR
[] = { ';',0 };
89 static const WCHAR SDDL_DELIMINATOR
[] = { ':',0 };
90 static const WCHAR SDDL_ACE_BEGIN
[] = { '(',0 };
91 static const WCHAR SDDL_ACE_END
[] = { ')',0 };
94 #endif /* WINE_NO_UNICODE_MACROS */
96 BOOL WINAPI
ConvertSidToStringSidA( PSID
, LPSTR
* );
97 BOOL WINAPI
ConvertSidToStringSidW( PSID
, LPWSTR
* );
98 #define ConvertSidToStringSid WINELIB_NAME_AW(ConvertSidToStringSid)
100 BOOL WINAPI
ConvertStringSidToSidA( LPCSTR
, PSID
* );
101 BOOL WINAPI
ConvertStringSidToSidW( LPCWSTR
, PSID
* );
102 #define ConvertStringSidToSid WINELIB_NAME_AW(ConvertStringSidToSid)
104 BOOL WINAPI
ConvertStringSecurityDescriptorToSecurityDescriptorA(
105 LPCSTR
, DWORD
, PSECURITY_DESCRIPTOR
*, PULONG
);
106 BOOL WINAPI
ConvertStringSecurityDescriptorToSecurityDescriptorW(
107 LPCWSTR
, DWORD
, PSECURITY_DESCRIPTOR
*, PULONG
);
108 #define ConvertStringSecurityDescriptorToSecurityDescriptor WINELIB_NAME_AW(ConvertStringSecurityDescriptorToSecurityDescriptor)
110 BOOL WINAPI
ConvertSecurityDescriptorToStringSecurityDescriptorA(
111 PSECURITY_DESCRIPTOR
, DWORD
, SECURITY_INFORMATION
, LPSTR
*, PULONG
);
112 BOOL WINAPI
ConvertSecurityDescriptorToStringSecurityDescriptorW(
113 PSECURITY_DESCRIPTOR
, DWORD
, SECURITY_INFORMATION
, LPWSTR
*, PULONG
);
114 #define ConvertSecurityDescriptorToStringSecurityDescriptor WINELIB_NAME_AW(ConvertSecurityDescriptorToStringSecurityDescriptor)
120 #endif /* __SDDL_H__ */