I have a Microsoft Management Console snap-in for Windows NT4.0. This snap-in provides functionality through a COM object. When the MMC is launched and the snap-in is added to it, the user can right click on a tree view node of the snap-in and launch a property sheet to modify attributes for the snap-in. When the sheet is OK'd or Cancel'd without modifying anything, it used to work fine on Windows NT4.0, IIS4.0 and bring back focus to MMC. I am now starting the effort to port this snap-in onto Windows 2000 (Server). I haven't changed any code at all but when I do a OK or cancel, the snap-in crashes.
The unhandled exception drills down to this point of C library code (below). [see the commented line] How's the tooltip fall in the picture??
// cleanup thread local tooltip window
if (m_pToolTip != NULL)
/**CRASHES HERE---->*/ m_pToolTip->DestroyWindow();
// unhook windows hooks
if (m_hHookOldMsgFilter != NULL)
if (m_hHookOldCbtFilter != NULL)
// free safety pool buffer
if (m_pSafetyPoolBuffer != NULL)
// parking window must have already been cleaned up by now!
ASSERT(m_pWndPark == NULL);
When the property sheet is destroyed, it calls the MMCFreeNotifyHandle function in the destructor and then delete's it's own object as well.
Any idea why this may be crashing now? It's the exact same code on NT4.0, IIS4.0. It now crashes on Win2k, IIS5.0. The one thing different between the two MMC consoles is that the left side treeview in MMC on Win2k is placed on a property sheet itself whereas the IIS4.0 implementation just contains the tree without any other pages. How does the "m_pToolTip->DestroyWindow()" result to a crash when this wasn't the problem in IIS4.0 on NT4?
The address of m_pToolTip is 0xdddddddd, which is strange.
Thanks in advance for valuable inputs.