Windows XP SP1, VC++ 6.0, Platform SDK
I want to use PDH to enum processes on local machine. And I wrote the
DWORD dwCounterLen = 4096;
DWORD dwInstanceLen = 4096;
PDH_STATUS status = PdhEnumObjectItems(
If I call this function in main() in a console application, "InstanceList"
But if I call this function in WinMain() in a Win32 application, I'll get:
Obviously some of the process names get by console application are wrong.
Can PDH function work well with console mode applications?