Sometimes, win2k seems to automatically disable the performance query function. You can see this, if the program is unable to receive any performance information.
Fix the registry with the following procedure:
Good code, great!!! Here's an important correction.
This code won't work on many PC, because
has a bug (documented by Microsoft) on Windows NT Server/Workstation 4.0. This bug can cause the function to return incomplete information, and even cause application to stop responding. I believe this bug is not fixed by any Service Pack.
Microsoft say the UNICODE version of this function (RegQueryValueExW) should be used instead when using
Here's the fix:
In MFNetTraffic.cpp, replace the two calls to RegQueryValueEx (line 131 and line 269) by:
RegQueryValueExW (HKEY_PERFORMANCE_DATA, L"510",
For more information, take a look at:
Q226371, Q259394, (MSDN October 2001)
A very interesting article, thank you. The only problem is I compile the project under Win 2K, VC6.0 SP5. When I run the program I have the popup dialog box as shown but nothing happen. Am I overlooking something?