Artifact 4ff4b2ce63f9b1ac1fb4203684b334f071ccaa7d
- File
src/win32/secext.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.
/***********************************************************************\ * secext.d * * * * Windows API header module * * * * Translated from MinGW Windows headers * * * * Placed into public domain * \***********************************************************************/ // Don't include this file directly, use win32.security instead. module win32.secext; pragma(lib, "secur32"); private import win32.w32api, win32.windef; static assert (_WIN32_WINNT >= 0x501, "SecExt is only available on WindowsXP and later"); enum EXTENDED_NAME_FORMAT { NameUnknown, NameFullyQualifiedDN, NameSamCompatible, NameDisplay, // = 3 NameUniqueId = 6, NameCanonical, NameUserPrincipal, NameCanonicalEx, NameServicePrincipal, // = 10 NameDnsDomain = 12 } alias EXTENDED_NAME_FORMAT* PEXTENDED_NAME_FORMAT; extern (Windows) { BOOLEAN GetComputerObjectNameA(EXTENDED_NAME_FORMAT, LPSTR, PULONG); BOOLEAN GetComputerObjectNameW(EXTENDED_NAME_FORMAT, LPWSTR, PULONG); BOOLEAN GetUserNameExA(EXTENDED_NAME_FORMAT, LPSTR, PULONG); BOOLEAN GetUserNameExW(EXTENDED_NAME_FORMAT, LPWSTR, PULONG); BOOLEAN TranslateNameA(LPCSTR, EXTENDED_NAME_FORMAT, EXTENDED_NAME_FORMAT, LPSTR, PULONG); BOOLEAN TranslateNameW(LPCWSTR, EXTENDED_NAME_FORMAT, EXTENDED_NAME_FORMAT, LPWSTR, PULONG); } version (Unicode) { alias GetComputerObjectNameW GetComputerObjectName; alias GetUserNameExW GetUserNameEx; alias TranslateNameW TranslateName; } else { alias GetComputerObjectNameA GetComputerObjectName; alias GetUserNameExA GetUserNameEx; alias TranslateNameA TranslateName; }