detoursexample1.cpp 693 B

12345678910111213141516171819202122232425262728293031323334
  1. // detoursexample1.cpp : Defines the entry point for the console application.
  2. //
  3. #include "stdafx.h"
  4. #include "windows.h"
  5. int _tmain(int argc, _TCHAR* argv[])
  6. {
  7. fprintf(stderr, "!!!!detoursexample1 starting!!!\n");
  8. printf("!!!!detoursexample1 starting!!!\n");
  9. fflush(stdout);
  10. OutputDebugString("!!!! ITS ME !!!!");
  11. for(int i=0; i<100; i++)
  12. {
  13. fprintf(stderr, ".");
  14. char* tmp = (char*) malloc(100);
  15. //tmp[110] = 'a';
  16. //free(tmp);
  17. }
  18. /* HANDLE h = HeapCreate(NULL, 1024, 2024);
  19. for(int i=0; i<100; i++)
  20. {
  21. fprintf(stderr, "+");
  22. char* tmp = (char*) HeapAlloc(h, 0, 100);
  23. HeapFree(h, 0, tmp);
  24. }
  25. HeapDestroy(h);
  26. */
  27. fprintf(stderr, "detoursexample1 done\n");
  28. return 0;
  29. }