I have a standard C++ Enum class... which works great the first time....
CEnumWndows::CEnumWindows(const CSessionList *p_csl)
{
::EnumWindows(this->EnumFunc, (LPARAM)(CSessionList *) p_csl);
}
BOOL CALLBACK CEnumWindows::EnumFunc(HWND hMywnd, LPARAM lParam)
{
.
.
The above CALLBACK function is declared static in the class header.
The first time this executes, it enumerates all the windows as expected.
The second time, when it calls the static EnumFunc, I get a message that the thread exited with a code of -1000. EnumFunc call fails.
-The thread 0xFE0 has exited with code -1000 (0xFFFFFC18).
The class has a 'new' and a 'delete' for each use. But this did not help.
What am I missing?
Comments
Post a Comment