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

SystemFunction036RtlGenRandom #1519

Closed
ChrisDenton opened this issue Apr 4, 2023 · 2 comments
Closed

SystemFunction036RtlGenRandom #1519

ChrisDenton opened this issue Apr 4, 2023 · 2 comments

Comments

@ChrisDenton
Copy link
Contributor

Would it be possible to add metadata to express that SystemFunction036 (currently in Windows.Win32.Security.Authentication.Identity.Apis) has a friendlier name, like RtlGenRandom? There are a few such functions:

Symbol name Nice name
SystemFunction036 RtlGenRandom
SystemFunction040 RtlEncryptMemory
SystemFunction041 RtlDecryptMemory

Simply changing the name in the metadata won't work as they do need to be loaded by their symbol name.

@riverar
Copy link
Collaborator

riverar commented Apr 4, 2023

Seems easy enough, DllImport supports this today.

e.g.

[DllImport("ADVAPI32.dll", EntryPoint = "SystemFunction036", ExactSpelling = true, PreserveSig = false)]
public unsafe static extern BOOLEAN RtlGenRandom(...)

@kennykerr
Copy link
Contributor

Added windows-targets support for alternate symbol names: microsoft/windows-rs#2440

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

3 participants