From: Christopher Yeleighton on
I am using Visual Studio .NET 2003.
Here is an excerpt from source file appui2.cpp:

case CCommandLineInfo::FileDDE:
m_pCmdInfo = (CCommandLineInfo*)(UINT_PTR)m_nCmdShow;
m_nCmdShow = SW_HIDE;
break;

Now, what is this? m_pCmdInfo gets 0x1, it is an invalid pointer. It makes
my application crash on exit. I had to set m_nCmdShow to 00 to work around
it.
From: David Lowndes on
>I am using Visual Studio .NET 2003.
>Here is an excerpt from source file appui2.cpp:
>
> case CCommandLineInfo::FileDDE:
> m_pCmdInfo = (CCommandLineInfo*)(UINT_PTR)m_nCmdShow;
> m_nCmdShow = SW_HIDE;
> break;
>
>Now, what is this? m_pCmdInfo gets 0x1, it is an invalid pointer. It makes
>my application crash on exit.

Christopher,

If you build a minimal MFC application to reproduce the problem, does
it cause that to crash in the same way?

I thought this rang a bell, here's an old thread courtesy of Google
groups (watch of for wrapping of the link) ...

http://groups.google.co.uk/groups?hl=en&lr=&threadm=32d63701.4995959%40sparcone.bj.co.uk&rnum=3&prev=/groups%3Fq%3Dm_pCmdInfo%2520FileDDE%26hl%3Den%26lr%3D%26sa%3DN%26tab%3Dwg

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
From: Christopher Yeleighton on
But my application should not crash whatever the command line is. Suppose my
client calls it with the /dde switch from the command line or from a desktop
shortcut or from a registry key or whatever; no DDE command follows and the
application crashes on exit. MFC being so buggy, I wonder if it is sane to
use it at all.

BTW This bug came up because MFC 7.1 does not handle DDE commands correctly.

Chris

"David Lowndes" wrote:

> >I am using Visual Studio .NET 2003.
> >Here is an excerpt from source file appui2.cpp:
> >
> > case CCommandLineInfo::FileDDE:
> > m_pCmdInfo = (CCommandLineInfo*)(UINT_PTR)m_nCmdShow;
> > m_nCmdShow = SW_HIDE;
> > break;
> >
> >Now, what is this? m_pCmdInfo gets 0x1, it is an invalid pointer. It makes
> >my application crash on exit.
>
> Christopher,
>
> If you build a minimal MFC application to reproduce the problem, does
> it cause that to crash in the same way?
>
> I thought this rang a bell, here's an old thread courtesy of Google
> groups (watch of for wrapping of the link) ...
>
> http://groups.google.co.uk/groups?hl=en&lr=&threadm=32d63701.4995959%40sparcone.bj.co.uk&rnum=3&prev=/groups%3Fq%3Dm_pCmdInfo%2520FileDDE%26hl%3Den%26lr%3D%26sa%3DN%26tab%3Dwg
>
> Dave
> --
> MVP VC++ FAQ: http://www.mvps.org/vcfaq
>