Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Struct

ATTRIBUTE

Public Struct
std.os.windows.PS.ATTRIBUTE
pub const ATTRIBUTE = extern struct

Fields

Attribute: Type
Size: SIZE_T
u: extern union { Value: ULONG_PTR, ValuePtr: PVOID, }
ReturnLength: ?*SIZE_T

Structs

Types

File

os/windows.zig:27
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
    pub const ATTRIBUTE = extern struct {
        Attribute: Type,
        Size: SIZE_T,
        u: extern union {
            Value: ULONG_PTR,
            ValuePtr: PVOID,
        },
        ReturnLength: ?*SIZE_T,

        /// https://ntdoc.m417z.com/ps_attribute_num
        /// Tag type is `u16` based on PS_ATTRIBUTE_NUMBER_MASK being 0xFFFF
        pub const NUM = enum(u16) {
            ParentProcess = 0,
            DebugObject,
            Token,
            ClientId,
            TebAddress,
            ImageName,
            ImageInfo,
            MemoryReserve,
            PriorityClass,
            ErrorMode,
            StdHandleInfo,
            HandleList,
            GroupAffinity,
            PreferredNode,
            IdealProcessor,
            UmsThread,
            MitigationOptions,
            ProtectionLevel,
            SecureProcess,
            JobList,
            ChildProcessPolicy,
            AllApplicationPackagesPolicy,
            Win32kFilter,
            SafeOpenPromptOriginClaim,
            BnoIsolation,
            DesktopAppPolicy,
            Chpe,
            MitigationAuditOptions,
            MachineType,
            ComponentFilter,
            EnableOptionalXStateFeatures,
            SupportedMachines,
            SveVectorLength,
        };

        /// https://ntdoc.m417z.com/psattributevalue
        pub const Type = enum(ULONG_PTR) {
            TEB_ADDRESS = construct(.TebAddress, true, false, false),
            _,

            pub fn construct(num: NUM, thread: bool, input: bool, additive: bool) ULONG_PTR {
                var val: ULONG_PTR = @backingInt(num);
                if (thread) val |= 0x10000;
                if (input) val |= 0x20000;
                if (additive) val |= 0x40000;
                return val;
            }
        };

        pub const LIST = extern struct {
            TotalLength: SIZE_T,
            Attributes: [1]ATTRIBUTE,
        };
    }