Created
March 23, 2020 21:39
-
-
Save kant2002/fc41e61d711eade16180e124ef73e3b6 to your computer and use it in GitHub Desktop.
How to wrap UEFI functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[StructLayout(LayoutKind.Sequential)] | |
public unsafe readonly struct EFI_SIMPLE_TEXT_INPUT_PROTOCOL | |
{ | |
private readonly IntPtr _reset; | |
private readonly IntPtr _readKeyStroke; | |
public readonly IntPtr WaitForKey; | |
public void Reset(void* handle, bool ExtendedVerification) | |
{ | |
RawCalliHelper.StdCall(_reset, (byte*)handle, ExtendedVerification); | |
} | |
public ulong ReadKeyStroke(void* handle, EFI_INPUT_KEY* Key) | |
{ | |
return RawCalliHelper.StdCall(_readKeyStroke, (byte*)handle, Key); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment