Description

This behavior is observed in version 10.0.40219.1 SP1Rel
atlbase.h contains this code in CAtlExeModuleT
HANDLE StartMonitor() throw()
{
m_hEventShutdown = ::CreateEvent(NULL, false, false, NULL);
if (m_hEventShutdown == NULL)
{
return NULL;
}
DWORD dwThreadID;
HANDLE hThread = ::CreateThread(NULL, 0, MonitorProc, this, 0, &dwThreadID);
if(hThread==NULL)
{
::CloseHandle(m_hEventShutdown);
}
return hThread;
}
Note the "if(hThread==NULL)" branch - the handle is closed, but the member variable is not set to null. This is likely an error - the handle should be set to null once closed to avoid accidential double close. If the code is actually okay then a comment explaining the idea behind the code is needed.

Assign To

Posted by MS-Moderator08 [Feedback Moderator] on 12/21/2011 at 6:57 PM

Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.

Posted by MS-Moderator01 on 12/20/2011 at 1:43 AM

Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)