Skip to content
Discussion options

You must be logged in to vote

There are differences in code generation across the frameworks, but they aren't the ones you're looking at.
The two CreateFile overloads you refer two are both generated for all frameworks.

On .NET 7, we emit both of these:

internal static unsafe Microsoft.Win32.SafeHandles.SafeFileHandle CreateFile(string lpFileName, winmdroot.Storage.FileSystem.FILE_ACCESS_FLAGS dwDesiredAccess, winmdroot.Storage.FileSystem.FILE_SHARE_MODE dwShareMode, winmdroot.Security.SECURITY_ATTRIBUTES? lpSecurityAttributes, winmdroot.Storage.FileSystem.FILE_CREATION_DISPOSITION dwCreationDisposition, winmdroot.Storage.FileSystem.FILE_FLAGS_AND_ATTRIBUTES dwFlagsAndAttributes, SafeHandle hTemplateFile)

internal st…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by jorgegr1707
Comment options

You must be logged in to vote
2 replies
@AArnott
Comment options

@jorgegr1707
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants