On Friday, 1 December 2023 at 08:45:30 UTC, Kagamin wrote:
Is GENERIC_WRITE awailable?

No, it's not.

I tried building with LDC 1.35.0: ```"D:\ldc2-1.35.0-windows-x64\bin\ldc2.exe" main.d -i -vcg-ast```.

winnt.h:
```c
// begin_wdm
// begin_ntoshvp
typedef DWORD ACCESS_MASK;
typedef ACCESS_MASK *PACCESS_MASK;

// end_ntoshvp
// begin_access
////////////////////////////////////////////////////////////////////////
// // // ACCESS TYPES // // //
////////////////////////////////////////////////////////////////////////


// begin_wdm
//
// The following are masks for the predefined standard access types
//

#define DELETE                           (0x00010000L)
#define READ_CONTROL                     (0x00020000L)
#define WRITE_DAC                        (0x00040000L)
#define WRITE_OWNER                      (0x00080000L)
#define SYNCHRONIZE                      (0x00100000L)

#define STANDARD_RIGHTS_REQUIRED         (0x000F0000L)

#define STANDARD_RIGHTS_READ             (READ_CONTROL)
#define STANDARD_RIGHTS_WRITE            (READ_CONTROL)
#define STANDARD_RIGHTS_EXECUTE          (READ_CONTROL)

#define STANDARD_RIGHTS_ALL              (0x001F0000L)

#define SPECIFIC_RIGHTS_ALL              (0x0000FFFFL)

//
// AccessSystemAcl access type
//

#define ACCESS_SYSTEM_SECURITY           (0x01000000L)

//
// MaximumAllowed access type
//

#define MAXIMUM_ALLOWED                  (0x02000000L)

//
//  These are the generic rights.
//

#define GENERIC_READ                     (0x80000000L)
#define GENERIC_WRITE                    (0x40000000L)
#define GENERIC_EXECUTE                  (0x20000000L)
#define GENERIC_ALL                      (0x10000000L)

//
//  Define the generic mapping array.  This is used to denote the
// mapping of each generic access right to a specific access mask.
//

typedef struct _GENERIC_MAPPING {
    ACCESS_MASK GenericRead;
    ACCESS_MASK GenericWrite;
    ACCESS_MASK GenericExecute;
    ACCESS_MASK GenericAll;
} GENERIC_MAPPING;
typedef GENERIC_MAPPING *PGENERIC_MAPPING;
```

wintest.c.cg:
```d
        alias ACCESS_MASK = uint;
        alias PACCESS_MASK = uint*;
        align struct _GENERIC_MAPPING
        {
                uint GenericRead = void;
                uint GenericWrite = void;
                uint GenericExecute = void;
                uint GenericAll = void;
        }
        alias GENERIC_MAPPING = _GENERIC_MAPPING;
        alias PGENERIC_MAPPING = _GENERIC_MAPPING*;
```

It ended up not producing any enums inbetween...


Reply via email to