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

FILE_NO_COMPRESSION and FILE_OPEN_NO_RECALL are defined twice #2048

Open
ChrisDenton opened this issue Jan 16, 2025 · 3 comments
Open

FILE_NO_COMPRESSION and FILE_OPEN_NO_RECALL are defined twice #2048

ChrisDenton opened this issue Jan 16, 2025 · 3 comments

Comments

@ChrisDenton
Copy link
Contributor

The definitions of FILE_NO_COMPRESSION and FILE_OPEN_NO_RECALL in Windows.Win32.System.WindowsProgramming.Apis should be removed as these are defined as part of the NTCREATEFILE_CREATE_OPTIONS flags enum:

// Windows.Wdk.Storage.FileSystem.NTCREATEFILE_CREATE_OPTIONS
[Flags]
public enum NTCREATEFILE_CREATE_OPTIONS : uint
{
	FILE_DIRECTORY_FILE = 1u,
	FILE_NON_DIRECTORY_FILE = 0x40u,
	FILE_WRITE_THROUGH = 2u,
	FILE_SEQUENTIAL_ONLY = 4u,
	FILE_RANDOM_ACCESS = 0x800u,
	FILE_NO_INTERMEDIATE_BUFFERING = 8u,
	FILE_SYNCHRONOUS_IO_ALERT = 0x10u,
	FILE_SYNCHRONOUS_IO_NONALERT = 0x20u,
	FILE_CREATE_TREE_CONNECTION = 0x80u,
	FILE_NO_EA_KNOWLEDGE = 0x200u,
	FILE_OPEN_REPARSE_POINT = 0x200000u,
	FILE_DELETE_ON_CLOSE = 0x1000u,
	FILE_OPEN_BY_FILE_ID = 0x2000u,
	FILE_OPEN_FOR_BACKUP_INTENT = 0x4000u,
	FILE_RESERVE_OPFILTER = 0x100000u,
	FILE_OPEN_REQUIRING_OPLOCK = 0x10000u,
	FILE_COMPLETE_IF_OPLOCKED = 0x100u,
	FILE_OPEN_FOR_FREE_SPACE_QUERY = 0x800000u,
	FILE_CONTAINS_EXTENDED_CREATE_INFORMATION = 0x10000000u,
	FILE_NO_COMPRESSION = 0x8000u,
	FILE_DISALLOW_EXCLUSIVE = 0x20000u,
	FILE_SESSION_AWARE = 0x40000u,
	FILE_OPEN_NO_RECALL = 0x400000u
}
@riverar
Copy link
Collaborator

riverar commented Jan 16, 2025

They're also loosely defined in user mode winternl.h, which makes this an awkward disambiguation exercise.

@ChrisDenton
Copy link
Contributor Author

I suspect there might be other issues caused by winternl.h duplications.

@ChrisDenton
Copy link
Contributor Author

Hm, actually can the file be skipped entirely? It's whole reason for being is to define a subset of wdk types for the sdk, no?

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