fork download
  1. #define _CRT_SECURE_NO_WARNINGS
  2.  
  3. #include <Windows.h>
  4.  
  5. int main(int argc, char** argv)
  6. {
  7. char code[] =
  8. {
  9. 0x90,
  10. 0x90
  11. };
  12.  
  13. FARPROC adress = (FARPROC)VirtualAlloc(
  14. NULL,
  15. sizeof(code),
  16. MEM_COMMIT | MEM_RESERVE,
  17. PAGE_EXECUTE_READWRITE
  18. );
  19.  
  20. CopyMemory(adress, &code, sizeof(code));
  21.  
  22. adress();
  23.  
  24. VirtualFree(adress, 0, MEM_RELEASE);
  25.  
  26. return 0;
  27. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3:10: fatal error: 'Windows.h' file not found
#include <Windows.h>
         ^~~~~~~~~~~
1 error generated.
stdout
Standard output is empty