title: Can't get thread context from a Windows 64 bit process
body: <p>Hello so I'm trying to get the thread context of a 64bit process on the system. I've tried using both a 32 bit and a 64 bit solution with the correct functions. But I always end up with the error '0x57', Invalid parameter. A short sample from the 64bit code.</p>
  
  <pre><code>// open a handle to the thread
  HANDLE hThread = OpenThread(THREAD_GET_CONTEXT | THREAD_SET_CONTEXT | 
  THREAD_SUSPEND_RESUME | THREAD_QUERY_INFORMATION, FALSE,
          atoi(argv[1]));
  if(hThread  == NULL) {
      printf("Error opening thread handle.. 0x%08x\n", GetLastError());
      return 0;
  }
  
  // suspend the thread
  if(Wow64SuspendThread(hThread ) == -1) {
      printf("Error suspending thread.. 0x%08x\n", GetLastError());
      CloseHandle(hThread );
      return 0;
  }
  
  // get the thread context
  WOW64_CONTEXT orig_ctx = {WOW64_CONTEXT_FULL };
  if(GetThreadContext(hThread , &amp;orig_ctx) == FALSE) {
      printf("Error  0x%08x\n", GetLastError());
      CloseHandle(hThread );
      return 0;
  }
  </code></pre>
  
  <p>I doubt the handle is wrong, the code worked correctly on 32bit processes. I would greatly appreciate any help or advice. Thanks in advance!</p>