Skip to content

Instantly share code, notes, and snippets.

@somma
Created September 22, 2014 05:03
Show Gist options
  • Save somma/14ae7d3de31a1b2f4172 to your computer and use it in GitHub Desktop.
Save somma/14ae7d3de31a1b2f4172 to your computer and use it in GitHub Desktop.
_WIN64 macro
#if defined(_WIN64)
//> x64 code
ULONG64 x64_read_msr(IN UINT32 msr_index);
void x64_write_msr(IN UINT32 msr_index, IN UINT32 msr_low, IN UINT32 msr_high);
#elif defined(_X86_)
//> x86 code
void __stdcall x86_read_msr(IN UINT32 msr_index, OUT MSR* msr);
void __stdcall x86_write_msr(IN UINT32 msr_index, IN UINT32 msr_low, IN UINT32 msr_high);
#else
#error !!!UNKNOWN ARCHITECTURE!!!
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment