Zig 0.17.0-dev (Split by item)

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 library itself.

OBJECT

windows.OBJECT
pub const OBJECT = struct

File

lib/std/os/windows.zig:95

Code

pub const OBJECT = struct {
    // ref: um/winternl.h

    pub const ATTRIBUTES = extern struct {
        Length: ULONG = @sizeOf(ATTRIBUTES),
        RootDirectory: ?HANDLE = null,
        ObjectName: ?*UNICODE_STRING = @constCast(&UNICODE_STRING.empty),
        Attributes: Flags = .{},
        SecurityDescriptor: ?*anyopaque = null,
        SecurityQualityOfService: ?*anyopaque = null,

        // Valid values for the Attributes field
        pub const Flags = packed struct(ULONG) {
            Reserved0: u1 = 0,
            INHERIT: bool = false,
            Reserved2: u2 = 0,
            PERMANENT: bool = false,
            EXCLUSIVE: bool = false,
            /// If name-lookup code should ignore the case of the ObjectName member rather than performing an exact-match search.
            CASE_INSENSITIVE: bool = true,
            OPENIF: bool = false,
            OPENLINK: bool = false,
            KERNEL_HANDLE: bool = false,
            FORCE_ACCESS_CHECK: bool = false,
            IGNORE_IMPERSONATED_DEVICEMAP: bool = false,
            DONT_REPARSE: bool = false,
            Reserved13: u19 = 0,

            pub const VALID_ATTRIBUTES: ATTRIBUTES = .{
                .INHERIT = true,
                .PERMANENT = true,
                .EXCLUSIVE = true,
                .CASE_INSENSITIVE = true,
                .OPENIF = true,
                .OPENLINK = true,
                .KERNEL_HANDLE = true,
                .FORCE_ACCESS_CHECK = true,
                .IGNORE_IMPERSONATED_DEVICEMAP = true,
                .DONT_REPARSE = true,
            };
        };
    };

    pub const INFORMATION_CLASS = enum(c_int) {
        Basic = 0,
        Name = 1,
        Type = 2,
        Types = 3,
        HandleFlag = 4,
        Session = 5,
        _,

        pub const Max: @typeInfo(@This()).@"enum".tag_type = @typeInfo(@This()).@"enum".field_names.len;
    };

    pub const NAME_INFORMATION = extern struct {
        Name: UNICODE_STRING,
    };
}