fork download
  1. /*
  2. * GTA CONSOLE SHOW by Fábio
  3. * http://g...content-available-to-author-only...t.com/
  4. * http://b...content-available-to-author-only...s.com/
  5. *
  6. * Licensed under WTFPLv2 (http://w...content-available-to-author-only...l.net/txt/copying/)
  7. */
  8. #include <Windows.h>
  9.  
  10. extern "C" int WINAPI DllMain(HINSTANCE hinst, unsigned long reason, void *lpReserved)
  11. {
  12. if(reason == DLL_PROCESS_ATTACH){
  13. // Alloc console memory
  14. if(AllocConsole()){
  15. // Create console buffer
  16. CreateConsoleScreenBuffer(GENERIC_WRITE, 2, 0, CONSOLE_TEXTMODE_BUFFER, 0);
  17. // printf don't working here... So, let's go use WriteFile to write text in console
  18. WriteFile(GetStdHandle(-11), // Get console output handle
  19. "GTA console show by Fabio\n", // String to write
  20. sizeof("GTA console show by Fabio\n") - 1, // Size of string - 1 to remove null terminator
  21. 0, 0);
  22. }
  23. }
  24. return TRUE;
  25. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty