winnt.h(222): Error C2146 – solution

Problem: VC++ 2005 report an error pointing to

   Error C2146: syntax error: missing ‘;’ before identifier PVOID64.

which points to winnt.h Line 222:

    typedef void * POINTER_64 PVOID64;

Solution:

#define POINTER_64 __ptr64   ///<<—- add this code to make everything all right
typedef void *PVOID;
typedef void * POINTER_64 PVOID64;

Reason: POINTER_64 is supposed to be defined here but in fact it’s not. So, we define it.

Reference: http://forums.msdn.microsoft.com/en-US/vclanguage/thread/51043152-3ab6-4a9e-b3c1-2dba8300d9bb/

Related Post

  • No Related Posts

No comments yet. Be the first.