qexing
November 16th, 2005, 10:50 PM
I want to use pdh.dll in my program, and I know it's not included in win98/95, but win2000 support it...
While I use it like this:
#include <pdh.h>
#pragma comment (lib,"Pdh.lib")
And in win98, it always give me a "can't found pdh.dll" error.
I have tried to use this:
#ifdef _WIN32_NT
#include <pdh.h>
#pragma comment (lib,"Pdh.lib")
#endif
But the error occurs again...
----------------------------------------------------------------------
And I try LoadLibrary and GetProcAddress, but the function "PdhAddCounterA" is always successfully loaded, but while I invoke it, it always returns error(Not ERROR_SUCCESS)
Can you help me to use pdh.dll in NT Os? Thank you!!
While I use it like this:
#include <pdh.h>
#pragma comment (lib,"Pdh.lib")
And in win98, it always give me a "can't found pdh.dll" error.
I have tried to use this:
#ifdef _WIN32_NT
#include <pdh.h>
#pragma comment (lib,"Pdh.lib")
#endif
But the error occurs again...
----------------------------------------------------------------------
And I try LoadLibrary and GetProcAddress, but the function "PdhAddCounterA" is always successfully loaded, but while I invoke it, it always returns error(Not ERROR_SUCCESS)
Can you help me to use pdh.dll in NT Os? Thank you!!