Skip to content

Variable length arrays in ntdll definitions #6008

@kubkon

Description

@kubkon

@daurnimator suggested leaving out the variable length arrays (VLAs) from some of our NT definitions; for example, we currently have something like this:

pub const FILE_NAME_INFORMATION = extern struct {
    FileNameLength: ULONG,
    FileName: [1]WCHAR,
};

where FileName is effectively a VLA which cannot be known a priori. The idea here is to weed that out leaving only the static elements, so in the above example, leaving in only FileNameLength. FileName VLA can then be accessed by taking a pointer just behind this static structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingImplementing this issue could cause existing code to no longer compile or have different behavior.enhancementSolving this issue will likely involve adding new logic or components to the codebase.os-windowsMicrosoft Windowsstandard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions