// create main MDI Frame window
if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
return FALSE;
The call to CMainFrame::LoadFrame(...), in turn, calls
CFrameWnd::LoadFrame(...), which fails.
I don't understand what's going on. I understand that this is a very
open ended question, but any help will be greatly appreciated.
Thanks
Abhijit
That call leads to numerous layers of MFC code, so a much lower level
analysis will be required. If you do not have the MFC source code
installed, do that first. Then start by examining the debugger stack
window when the access violation occurs. This will bring you much
closer to the problem. Double clicking on lines in the stack window
will display the MFC code at each layer, giving you some hint what it is
doing when the failure occurs.
--
Scott McPhillips [VC++ MVP]
Thanks for your email. I did go into the details of MFC code from the
call to LoadFrame(...) but found that the code is behaving
erratically. Whenever the failure occurs, it is in the call to
Create(...) or CreateEx(...). The parameters passed to this function
seemed reasonable. However, what intrigues me is that occasionally,
some calls to Create(...) or CreateEx(...) succeed, but next time
around, the same calls fail with "Access violation (0xC0000005)".
I uninstalled Windows XP SP2, and found that the application works
perfectly (exact same code) without any problems whatsoever. This is
our released product, and I am frustrated that Windows XP SP2 has
caused it to fail.
In another post on this newsgroup, I read that the version of
MFC42.dll shipped with Windows XP SP2 is significantly higher than
what is currently installed on my system (without SP2). I am thinking
that this could be causing the failure. Is there a MS support article
which describes changes to MFC library shipped with Windows XP SP2?
In addition to MFC, my application uses calls to core Windows
functions (Platform SDK), notably MSI APIs. Therefore, I thought I'd
install Platform SDK for Windows XP SP2 (which is a new release). I am
currently installing it, but I don't expect any miracles after that
installation.
I also noticed that Microsoft has SP6 for Visual Studio 6.0. I don't
know whether I have SP5 or SP6 installed on my computer (I checked the
"About" box for VC++6 but it does not show SP5/SP6 etc). Is there any
way to check this?
This has become a thorny problem for us because many of our users are
complaining that the software does not work with Windows XP SP2.
Thanks for your help...
Abhijit
"Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp> wrote in message news:<eVGAbo4k...@tk2msftngp13.phx.gbl>...
I do think our issue is similar in that we believe we aren't able to create
a window which then we return out of the current message handler. Perhaps a
particular window style setting is causing the problem. In this case ours
would be a CFrameWnd.
"Abhijit Patait" <abhi...@hotmail.com> wrote in message
news:473bc1dc.0409...@posting.google.com...