extern "C" { typedef struct _CONTEXT CONTEXT, *PCONTEXT; }
You need to declare that _CONTEXT is a struct . And declare it as extern "C" to match the external link of windows.h (which is the C header).
However, you do not need to specify a definition for typedef , but if you do, all definitions must comply ( One definition rule ).
EDIT: I also forgot the extern "C".
source share