Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OBJECT_ATTRIBUTES has missing field types #82

Open
kennykerr opened this issue Oct 9, 2024 · 0 comments
Open

OBJECT_ATTRIBUTES has missing field types #82

kennykerr opened this issue Oct 9, 2024 · 0 comments
Assignees

Comments

@kennykerr
Copy link

The metadata has this:

public struct OBJECT_ATTRIBUTES
{
	public uint Length;

	public HANDLE RootDirectory;

	[Const]
	public unsafe UNICODE_STRING* ObjectName;

	public uint Attributes;

	[Const]
	public unsafe void* SecurityDescriptor;

	[Const]
	public unsafe void* SecurityQualityOfService;
}

But the header has this definition:

typedef struct _OBJECT_ATTRIBUTES {
    ULONG Length;
    HANDLE RootDirectory;
    PUNICODE_STRING ObjectName;
    ULONG Attributes;
    PVOID SecurityDescriptor;        // Points to type SECURITY_DESCRIPTOR
    PVOID SecurityQualityOfService;  // Points to type SECURITY_QUALITY_OF_SERVICE
} OBJECT_ATTRIBUTES;
typedef OBJECT_ATTRIBUTES *POBJECT_ATTRIBUTES;
typedef CONST OBJECT_ATTRIBUTES *PCOBJECT_ATTRIBUTES;

Admittedly the types are only lurking in the comments, but it would be useful if we can actually use the correct types as they do exist in metadata.

@mikebattista mikebattista transferred this issue from microsoft/win32metadata Nov 8, 2024
@mikebattista mikebattista self-assigned this Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants