none
Winnt.h

    Question

  • I am trying to build my code in MS Visual C++ with PSDK Server 2003 R2.

    I cant get past these errors, these are not even in my code!
    c:\program files\microsoft platform sdk\include\winnt.h(3858) : error C2146: syntax error : missing ';' before identifier 'ContextRecord'
    c:\program files\microsoft platform sdk\include\winnt.h(3858) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft platform sdk\include\winnt.h(3858) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\program files\microsoft platform sdk\include\winnt.h(8320) : error C2065: 'PCONTEXT' : undeclared identifier
    c:\program files\microsoft platform sdk\include\winnt.h(8321) : error C2146: syntax error : missing ')' before identifier 'ContextRecord'
    c:\program files\microsoft platform sdk\include\winnt.h(8321) : warning C4229: anachronism used : modifiers on data are ignored
    c:\program files\microsoft platform sdk\include\winnt.h(8321) : error C2182: 'RtlCaptureContext' : illegal use of type 'void'
    c:\program files\microsoft platform sdk\include\winnt.h(8321) : error C2491: 'RtlCaptureContext' : definition of dllimport data not allowed
    c:\program files\microsoft platform sdk\include\winnt.h(8321) : error C2059: syntax error : ')'
    c:\program files\microsoft platform sdk\include\winnt.h(9595) : error C3861: '__readfsdword': identifier not found

    Any help would be much appreciated.

    Tuesday, May 08, 2007 9:04 PM

Answers

  • PCONTEXT should be defined in the same header, winnt.h. Because CPU context is platform-specific, it defined using architecture cheks, like #ifdef _IA64_ for Itanium CPU. In your case, PCONTEXT is not defined, so there is something wrong with platform-based macroses. You could manually (by looking through winnt.h) check which define is required to allow correct CONTEXT structure to be defined in order to troubleshoot the problem.
    Wednesday, May 09, 2007 7:11 AM

All replies

  • Hmm, are you including windows.h and coming up with these errors or are you just including winnt.h. If you want to use things from winnt.h you should include windows.h and then set the macros accordingly. Please see http://msdn2.microsoft.com/en-us/library/aa383745.aspx for information on the macros.
    Tuesday, May 08, 2007 10:51 PM
  • PCONTEXT should be defined in the same header, winnt.h. Because CPU context is platform-specific, it defined using architecture cheks, like #ifdef _IA64_ for Itanium CPU. In your case, PCONTEXT is not defined, so there is something wrong with platform-based macroses. You could manually (by looking through winnt.h) check which define is required to allow correct CONTEXT structure to be defined in order to troubleshoot the problem.
    Wednesday, May 09, 2007 7:11 AM
  • For whom it might concern, there have been three threads posted by this user asking about winnt.h, so you might want to check the other threads to see if the question has been answered.

     

    Wednesday, May 09, 2007 8:23 AM
  • For whom it might concern, there have been three threads posted by this user asking about winnt.h, so you might want to check the other threads to see if the question has been answered.

    Wednesday, May 09, 2007 8:24 AM
  • I will try that out
    Wednesday, May 09, 2007 5:23 PM