comctl32/tests: Use CRT allocation functions.
[wine.git] / include / sddl.h
blob34af30d83c37705a2599ecc366b0520ffd090d6d
1 /*
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
18 #ifndef __SDDL_H__
19 #define __SDDL_H__
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
25 /* Versioning */
26 #define SDDL_REVISION_1 1
27 #define SDDL_REVISION SDDL_REVISION_1
29 #ifndef WINE_NO_UNICODE_MACROS
30 /* Component tags */
31 #ifndef UNICODE
32 # define SDDL_OWNER "O"
33 # define SDDL_GROUP "G"
34 # define SDDL_DACL "D"
35 # define SDDL_SACL "S"
36 #else
37 # if defined(_MSC_VER) || defined(__MINGW32__)
38 # define SDDL_OWNER L"O"
39 # define SDDL_GROUP L"G"
40 # define SDDL_DACL L"D"
41 # define SDDL_SACL L"S"
42 # else
43 static const WCHAR SDDL_OWNER[] = { 'O',0 };
44 static const WCHAR SDDL_GROUP[] = { 'G',0 };
45 static const WCHAR SDDL_DACL[] = { 'D',0 };
46 static const WCHAR SDDL_SACL[] = { 'S',0 };
47 # endif
48 #endif /* UNICODE */
50 /* Separators as characters */
51 /* SDDL_SEPERATORC is not a typo, as per Microsoft's headers */
52 #ifndef UNICODE
53 # define SDDL_SEPERATORC ';'
54 # define SDDL_DELIMINATORC ':'
55 # define SDDL_ACE_BEGINC '('
56 # define SDDL_ACE_ENDC ')'
57 #else
58 # define SDDL_SEPERATORC ((WCHAR)';')
59 # define SDDL_DELIMINATORC ((WCHAR)':')
60 # define SDDL_ACE_BEGINC ((WCHAR)'(')
61 # define SDDL_ACE_ENDC ((WCHAR)')')
62 #endif /* UNICODE */
64 /* Separators as strings */
65 /* SDDL_SEPERATOR is not a typo, as per Microsoft's headers */
66 #ifndef UNICODE
67 # define SDDL_SEPERATOR ";"
68 # define SDDL_DELIMINATOR ":"
69 # define SDDL_ACE_BEGIN "("
70 # define SDDL_ACE_END ")"
71 #else
72 # if defined(_MSC_VER) || defined(__MINGW32__)
73 # define SDDL_SEPERATOR L";"
74 # define SDDL_DELIMINATOR L":"
75 # define SDDL_ACE_BEGIN L"("
76 # define SDDL_ACE_END L")"
77 # else
78 static const WCHAR SDDL_SEPERATOR[] = { ';',0 };
79 static const WCHAR SDDL_DELIMINATOR[] = { ':',0 };
80 static const WCHAR SDDL_ACE_BEGIN[] = { '(',0 };
81 static const WCHAR SDDL_ACE_END[] = { ')',0 };
82 # endif
83 #endif /* UNICODE */
84 #endif /* WINE_NO_UNICODE_MACROS */
86 WINADVAPI BOOL WINAPI ConvertSidToStringSidA( PSID, LPSTR* );
87 WINADVAPI BOOL WINAPI ConvertSidToStringSidW( PSID, LPWSTR* );
88 #define ConvertSidToStringSid WINELIB_NAME_AW(ConvertSidToStringSid)
90 WINADVAPI BOOL WINAPI ConvertStringSidToSidA( LPCSTR, PSID* );
91 WINADVAPI BOOL WINAPI ConvertStringSidToSidW( LPCWSTR, PSID* );
92 #define ConvertStringSidToSid WINELIB_NAME_AW(ConvertStringSidToSid)
94 WINADVAPI BOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorA(LPCSTR, DWORD, PSECURITY_DESCRIPTOR*, PULONG );
95 WINADVAPI BOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorW(LPCWSTR, DWORD, PSECURITY_DESCRIPTOR*, PULONG );
96 #define ConvertStringSecurityDescriptorToSecurityDescriptor WINELIB_NAME_AW(ConvertStringSecurityDescriptorToSecurityDescriptor)
98 WINADVAPI BOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorA(PSECURITY_DESCRIPTOR, DWORD, SECURITY_INFORMATION, LPSTR*, PULONG );
99 WINADVAPI BOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorW(PSECURITY_DESCRIPTOR, DWORD, SECURITY_INFORMATION, LPWSTR*, PULONG );
100 #define ConvertSecurityDescriptorToStringSecurityDescriptor WINELIB_NAME_AW(ConvertSecurityDescriptorToStringSecurityDescriptor)
102 #ifdef __cplusplus
104 #endif
106 #endif /* __SDDL_H__ */