GetThreadContext fails after a successful SuspendThread in Windows 7

前端 未结 1 916
粉色の甜心
粉色の甜心 2020-12-15 06:15

I\'m encountering an odd issue on a sampling profiler in Windows 7 (no such issues AFAICT on previous Windows OSes, be they 32 or 64 bit).

The profiler works by peri

1条回答
  •  有刺的猬
    2020-12-15 06:50

    Looking at the GetThreadContext function, it mentions that

    The CONTEXT structure is highly processor specific. Refer to the WinNt.h header file for processor-specific definitions of this structures and any alignment requirements.

    And looking at this file, _CONTEXT is declared with

    typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
    ...
    

    So it's possible it could be an alignment issue.

    0 讨论(0)
提交回复
热议问题