0

I got a project from the web. The "solution" and the "projects" files were coded for VS2010 but I changed the version numbers and I could load them in my VS2005. I tried to build the solution and I get errors like:

'WOW64_CONTEXT': undeclared identifier
'wow64Context': undeclared identifier
'Wow64GetThreadContext': is not a member of 'global namespace'
etc...

I know from the doc that WOW64_CONTEXT must be declared inside winnt.h. On my system, it is not. What is going on? I'm new to WoW but I understand the concept. I just never used it.

Here is my setup (NOTE: I have Intel CC 9 installed but I don't use it for this project. I use the MS compiler):

Microsoft Visual Studio 2005 Version 8.0.50727.867 (vsvista.050727-8600) Microsoft .NET Framework Version 2.0.50727 SP2

Installed Edition: Professional Microsoft Visual C# 2005 77626-009-2220332-41593 Microsoft Visual C++ 2005 77626-009-2220332-41593 Microsoft Visual Studio 2005 Tools for Applications 77626-009-2220332-41593 Microsoft Web Application Projects 2005 77626-009-2220332-41593 Version 8.0.50727.867 Hotfix for Microsoft Visual Studio 2005 Professional Edition - ENU (KB932372)

Intel(R) C++ Compiler Integration for Microsoft Visual Studio 2005, Version 9.1.632.2005 , Copyright (C) 2002-2007 Intel Corporation.

Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1 (KB926601)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB2251481)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB2465367)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB2538218)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB971023)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB971090)
Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB973673)
Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB932232)

Can somebody help me?

dom_beau
  • 2,437
  • 3
  • 30
  • 59
  • The version of the Windows SDK included with VS2005 is badly outdated. Not sure if the latest SDK (7.1) still supports VS2005, but worth a shot. – Hans Passant Jul 12 '11 at 13:49

2 Answers2

1

Maybe someone else will ask this question again, although it was already here even 4 years.

  1. Open your C disk. and serch for WinNT.H.
  2. Open WinNT.H and serch for CONTEXT_AMD64
  3. DECLSPEC_ALIGN(16) _CONTEXT will feed your need.
  4. For short: Open WinNT.H and goto line:3647. Ok, got it.
user3071284
  • 6,955
  • 6
  • 43
  • 57
UPC_XJR
  • 11
  • 2
0

In the docs, see that "Minimum supported client: Vista" section.

You'll need a recent version of the Windows SDK that covers Vista, and also need to define the WINVER and _WIN32_WINNT macros to 0x600 or higher to enable Vista functions. The documentation is here and Raymond Chen gives some history on his blog.

Ben Voigt
  • 277,958
  • 43
  • 419
  • 720
  • Same bug, Ben. The problem is that WOW64_CONTEXT (and other Wow functions) are declared/defined nowhere on my disk. Why? Where should/can I find them? BTW, the values in the current code are WINVER = _WIN32_WINNT = 0x0501, _WIN32IE = 0x0400 and _RICHEDIT_VER = 0x0100. ... No "Wow effect" on me so far ! ;-) – dom_beau Jul 12 '11 at 13:42
  • 2
    Since you're trying to use types and functions that didn't even exist in 2005, I assume you've downloaded a newer Platform SDK that covers Vista (and probably Windows 7), such as [the currently latest version](http://www.microsoft.com/download/en/details.aspx?id=8279)? (Future users, check also [wikipedia](http://en.wikipedia.org/wiki/Microsoft_Windows_SDK) for updated links) – Ben Voigt Jul 12 '11 at 13:44
  • Don't assume that! Probablly you gave me the answer! Before getting the latest version and forcing all my colleagues to do the same, I will try to "comment" the code that is using these functions/defines. I can, afterward, assume I won't run on Wow64 for my app. – dom_beau Jul 12 '11 at 13:51
  • @dom_beau: Oh, you will run on WOW64 (I can't remember if VC++ 2005 even had 64-bit compilers), but you don't require any special steps to do so. Those structures you're talking about are for debugging 32-bit processes from a 64-bit debugger, stuff like that. – Ben Voigt Jul 12 '11 at 17:17