Hello,
In my application I am making a call to GetGUIThreadInfo() but it returns 0. After making a call to GetLastError() I see that it's returning 87; which hints to the fact that I am passing an incorrect parameter. Here is how I invoke it:
Code:
GUITHREADINFO info;
char buff[256];
info.cbSize = sizeof(GUITHREADINFO);
GetGUIThreadInfo(GetCurrentThreadId(), &info);
GetWindowText(info.hwndActive, buff, 256);
printf("Current Window: %s\n", buff);
The MSDN documentation indicates that the only thing required in order to let a call to GetGUIThreadInfo() function properly is setting the GUITHREADINFO's cbSize member to sizeof(GUITHREADINFO), which I am doing.
What can be wrong?