Differences From Artifact [dc98e950dc2783b3]:
- File
src/win32/aclapi.d
- 2015-04-21 10:46:55 - part of checkin [4e2933c620] on branch trunk - Rebased to the latest verson dmd 2.067. Not yet verified the outcome. (user: kinaba) [annotate]
To Artifact [c097a51ee1c3b3d3]:
- File
src/win32/aclapi.d
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
The problem was __gshared. Replacing it with TLS fixed the issue. Remaining problem is that "hack.d"'s CloseHandle hack is not working anymore.
(user: kinaba) [annotate]
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
5 5 * *
6 6 * Translated from MinGW Windows headers *
7 7 * by Stewart Gordon *
8 8 * *
9 9 * Placed into public domain *
10 10 \***********************************************************************/
11 11 module win32.aclapi;
12 -pragma(lib, "advapi32.lib");
12 +pragma(lib, "advapi32");
13 13
14 14 import win32.windows, win32.accctrl;
15 15
16 -static assert (_WIN32_WINNT_ONLY,
17 - "win32.aclapi is available only if version WindowsNTonly, WindowsXP, "
18 - "Windows2003 or WindowsVista is set");
19 -
20 16 extern (Windows) {
21 17 VOID BuildExplicitAccessWithNameA(PEXPLICIT_ACCESS_A, LPSTR, DWORD,
22 18 ACCESS_MODE, DWORD);
23 19 VOID BuildExplicitAccessWithNameW(PEXPLICIT_ACCESS_W, LPWSTR, DWORD,
24 20 ACCESS_MODE, DWORD);
25 21 DWORD BuildSecurityDescriptorA(PTRUSTEE_A, PTRUSTEE_A , ULONG,
26 22 PEXPLICIT_ACCESS_A, ULONG, PEXPLICIT_ACCESS_A, PSECURITY_DESCRIPTOR,
................................................................................
44 40 PACCESS_MASK);
45 41 DWORD GetAuditedPermissionsFromAclW(PACL, PTRUSTEE_W, PACCESS_MASK,
46 42 PACCESS_MASK);
47 43 DWORD GetEffectiveRightsFromAclA(PACL, PTRUSTEE_A, PACCESS_MASK);
48 44 DWORD GetEffectiveRightsFromAclW(PACL, PTRUSTEE_W, PACCESS_MASK);
49 45 DWORD GetExplicitEntriesFromAclA(PACL, PULONG, PEXPLICIT_ACCESS_A*);
50 46 DWORD GetExplicitEntriesFromAclW(PACL, PULONG, PEXPLICIT_ACCESS_W*);
51 - static if (WINVER >= 0x501) {
47 + static if (_WIN32_WINNT >= 0x501) {
52 48 DWORD GetInheritanceSourceA(LPSTR, SE_OBJECT_TYPE,
53 49 SECURITY_INFORMATION, BOOL, GUID**, DWORD, PACL, void*,
54 50 PGENERIC_MAPPING, PINHERITED_FROMA);
55 51 DWORD GetInheritanceSourceW(LPWSTR, SE_OBJECT_TYPE,
56 52 SECURITY_INFORMATION, BOOL, GUID**, DWORD, PACL, void*,
57 53 PGENERIC_MAPPING, PINHERITED_FROMW);
58 54 }