Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <cstdlib>
  2. #include <cstdio>
  3. #include <windows.h>
  4.  
  5. int main()
  6. {
  7. while (1)
  8. {
  9. DWORD dwProcessAffinityMask = 0;
  10. DWORD dwSystemAffinityMask = 0;
  11.  
  12. BOOL res = GetProcessAffinityMask(
  13. GetCurrentProcess(),
  14. (PDWORD_PTR)&dwProcessAffinityMask,
  15. (PDWORD_PTR)&dwSystemAffinityMask);
  16.  
  17. printf("%d 0x%X 0x%Xn",
  18. res,
  19. dwProcessAffinityMask,
  20. dwSystemAffinityMask);
  21.  
  22. Sleep(1000);
  23. }
  24.  
  25. return 0;
  26. }
  27.  
  28. 1 0x0 0x3
  29. 1 0x0 0x3
  30. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement