Differences From Artifact [817cc0a842105b34]:
- File        
src/win32/aclui.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 [b9488d42782563c4]:
- File        
src/win32/aclui.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  *             Translated from MinGW API for MS-Windows 3.10             *              6  *             Translated from MinGW API for MS-Windows 3.10             *
    7  *                           by Stewart Gordon                           *              7  *                           by Stewart Gordon                           *
    8  *                                                                       *              8  *                                                                       *
    9  *                       Placed into public domain                       *              9  *                       Placed into public domain                       *
   10  \***********************************************************************/             10  \***********************************************************************/
   11  module win32.aclui;                                                                   11  module win32.aclui;
   12  pragma(lib, "aclui.lib");                                                        |    12  pragma(lib, "aclui");
   13                                                                                        13  
   14  private import win32.w32api;                                                          14  private import win32.w32api;
   15                                                                                        15  
   16  static assert (_WIN32_WINNT_ONLY && _WIN32_WINNT >= 0x500,                       |    16  static assert (_WIN32_WINNT >= 0x500,
   17          "win32.aclui is available only if version WindowsXP, Windows2003 "       |    17          "win32.aclui is available only if version Windows2000, WindowsXP, Window
   18          "or WindowsVista is set, or both Windows2000 and WindowsNTonly are set") |    18          "or WindowsVista is set");
   19                                                                                        19  
   20  import win32.accctrl, win32.commctrl, win32.objbase;                                  20  import win32.accctrl, win32.commctrl, win32.objbase;
   21  private import win32.basetyps, win32.prsht, win32.unknwn, win32.windef,               21  private import win32.basetyps, win32.prsht, win32.unknwn, win32.windef,
   22    win32.winuser;                                                                      22    win32.winuser;
   23                                                                                        23  
   24                                                                                        24  
   25  struct SI_OBJECT_INFO {                                                               25  struct SI_OBJECT_INFO {
................................................................................................................................................................................
   57          SI_RESET_OWNER              = 0x00100000,                                     57          SI_RESET_OWNER              = 0x00100000,
   58          SI_NO_ADDITIONAL_PERMISSION = 0x00200000,                                     58          SI_NO_ADDITIONAL_PERMISSION = 0x00200000,
   59          SI_MAY_WRITE                = 0x10000000,                                     59          SI_MAY_WRITE                = 0x10000000,
   60          SI_EDIT_ALL                 = SI_EDIT_PERMS | SI_EDIT_OWNER                   60          SI_EDIT_ALL                 = SI_EDIT_PERMS | SI_EDIT_OWNER
   61                                        | SI_EDIT_AUDITS;                               61                                        | SI_EDIT_AUDITS;
   62                                                                                        62  
   63  struct SI_ACCESS {                                                                    63  struct SI_ACCESS {
   64          CPtr!(GUID) pguid;                                                       |    64          const(GUID)* pguid;
   65          ACCESS_MASK mask;                                                        |    65          ACCESS_MASK  mask;
   66          LPCWSTR     pszName;                                                     |    66          LPCWSTR      pszName;
   67          DWORD       dwFlags;                                                     |    67          DWORD        dwFlags;
   68  }                                                                                     68  }
   69  alias SI_ACCESS* PSI_ACCESS;                                                          69  alias SI_ACCESS* PSI_ACCESS;
   70                                                                                        70  
   71  // values for SI_ACCESS.dwFlags                                                       71  // values for SI_ACCESS.dwFlags
   72  const DWORD                                                                           72  const DWORD
   73          SI_ACCESS_SPECIFIC  = 0x00010000,                                             73          SI_ACCESS_SPECIFIC  = 0x00010000,
   74          SI_ACCESS_GENERAL   = 0x00020000,                                             74          SI_ACCESS_GENERAL   = 0x00020000,
   75          SI_ACCESS_CONTAINER = 0x00040000,                                             75          SI_ACCESS_CONTAINER = 0x00040000,
   76          SI_ACCESS_PROPERTY  = 0x00080000;                                             76          SI_ACCESS_PROPERTY  = 0x00080000;
   77                                                                                        77  
   78                                                                                        78  
   79  struct SI_INHERIT_TYPE {                                                              79  struct SI_INHERIT_TYPE {
   80          CPtr!(GUID) pguid;                                                       |    80          const(GUID)* pguid;
   81          ULONG       dwFlags;                                                     |    81          ULONG        dwFlags;
   82          LPCWSTR     pszName;                                                     |    82          LPCWSTR      pszName;
   83  }                                                                                     83  }
   84  alias SI_INHERIT_TYPE* PSI_INHERIT_TYPE;                                              84  alias SI_INHERIT_TYPE* PSI_INHERIT_TYPE;
   85                                                                                        85  
   86  /* values for SI_INHERIT_TYPE.dwFlags                                                 86  /* values for SI_INHERIT_TYPE.dwFlags
   87     INHERIT_ONLY_ACE, CONTAINER_INHERIT_ACE, OBJECT_INHERIT_ACE                        87     INHERIT_ONLY_ACE, CONTAINER_INHERIT_ACE, OBJECT_INHERIT_ACE
   88     defined elsewhere */                                                               88     defined elsewhere */
   89                                                                                        89  
................................................................................................................................................................................
   96                                                                                        96  
   97  const uint PSPCB_SI_INITDIALOG = WM_USER + 1;                                         97  const uint PSPCB_SI_INITDIALOG = WM_USER + 1;
   98                                                                                        98  
   99  interface ISecurityInformation : IUnknown {                                           99  interface ISecurityInformation : IUnknown {
  100          HRESULT GetObjectInformation(PSI_OBJECT_INFO);                               100          HRESULT GetObjectInformation(PSI_OBJECT_INFO);
  101          HRESULT GetSecurity(SECURITY_INFORMATION, PSECURITY_DESCRIPTOR*, BOOL);      101          HRESULT GetSecurity(SECURITY_INFORMATION, PSECURITY_DESCRIPTOR*, BOOL);
  102          HRESULT SetSecurity(SECURITY_INFORMATION, PSECURITY_DESCRIPTOR);             102          HRESULT SetSecurity(SECURITY_INFORMATION, PSECURITY_DESCRIPTOR);
  103          HRESULT GetAccessRights(CPtr!(GUID), DWORD, PSI_ACCESS*, ULONG*, ULONG*) |   103          HRESULT GetAccessRights(const(GUID)*, DWORD, PSI_ACCESS*, ULONG*, ULONG*
  104          HRESULT MapGeneric(CPtr!(GUID), UCHAR*, ACCESS_MASK*);                   |   104          HRESULT MapGeneric(const(GUID)*, UCHAR*, ACCESS_MASK*);
  105          HRESULT GetInheritTypes(PSI_INHERIT_TYPE*, ULONG*);                          105          HRESULT GetInheritTypes(PSI_INHERIT_TYPE*, ULONG*);
  106          HRESULT PropertySheetPageCallback(HWND, UINT, SI_PAGE_TYPE);                 106          HRESULT PropertySheetPageCallback(HWND, UINT, SI_PAGE_TYPE);
  107  }                                                                                    107  }
  108  alias ISecurityInformation* LPSECURITYINFO;                                      |   108  alias ISecurityInformation LPSECURITYINFO;
  109                                                                                       109  
  110  /* Comment from MinGW                                                                110  /* Comment from MinGW
  111   * TODO: ISecurityInformation2, IEffectivePermission, ISecurityObjectTypeInfo        111   * TODO: ISecurityInformation2, IEffectivePermission, ISecurityObjectTypeInfo
  112   */                                                                                  112   */
  113                                                                                       113  
  114  // FIXME: linkage attribute?                                                         114  // FIXME: linkage attribute?
  115  extern (C) /+DECLSPEC_IMPORT+/ extern const IID IID_ISecurityInformation;            115  extern (C) /+DECLSPEC_IMPORT+/ extern const IID IID_ISecurityInformation;
  116                                                                                       116  
  117  extern (Windows) {                                                                   117  extern (Windows) {
  118          HPROPSHEETPAGE CreateSecurityPage(LPSECURITYINFO psi);                       118          HPROPSHEETPAGE CreateSecurityPage(LPSECURITYINFO psi);
  119          BOOL EditSecurity(HWND hwndOwner, LPSECURITYINFO psi);                       119          BOOL EditSecurity(HWND hwndOwner, LPSECURITYINFO psi);
  120  }                                                                                    120  }