by APIJunkie
22. December 2009 07:17
I was recently porting an MFC C++ application that compiled on Visual studio 2005 32-bit to VS 2008 64-bit.
It turns out there is a bug in the code generated by older versions of MFC that makes it not compile on 64 bit.
The problem is with the OnTimer function signature:
afx_msg void OnTimer(UINT nIDEvent);
It should be changed to ->
afx_msg void OnTimer(UINT_PTR nIDEvent);
You can find Microsoft’s reaction to a similar connect bug report for VS 2005 at:
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101372
Hope this helps!
ca880e86-b60f-446d-a68a-835a18b6e2ce|0|.0
Tags:
MFC | C++ | Win64
by APIJunkie
22. March 2008 07:34
Last week we were trying to debug legacy 32-bit applications that were misbehaving on Windows 2008 64-bit.
Microsoft's debugging tools for windows information page states the following regarding When to Use 64-bit Debugging Tools.
"The 64-bit versions of Debugging Tools for Windows allow you to debug both 32-bit and 64-bit user-mode applications running on 64-bit processors. Use this package to debug both the application and the WOW64 emulator."
Unfortunately WinDbg 64-bit does not seem work properly on at least some of the 32-bit apps running on windows 2008 64-bit that we have tested.
The problem is that WindDbg does not seem to find the correct symbols for the 32 bit application you try to debug even though WinDbg finds the correct PDB symbol files.
To solve the problem we had to install the 32-bit version of the debugging tools for windows side by side with the 64-bit version (we did not have to uninstall the 64-bit version) and use the 32-bit version to debug the 32-bit applications running on the 64 bit version of windows.
Note that the version of the debugging tools for windows we used for both 32 and 64 bit debugging was version 6.8.4.0 released on October 18, 2007.