refer to Performance monitor for the values in the parameters.<br>
<br>
Data = PerfData("MachName", "Object", "Instance", "Counter", QHndl, CHndl)<br>
<br>
You have to reuse the QHndl and CHndl or you will run out of resources.
The following code works for me:<br>
<br>
Put this code in .bas Module:<br>
<br>
Private Declare Function PdhConnectMachine Lib "Pdh.Dll" Alias "PdhConnectMachineA" (ByVal MachName As String) As Long<br>
<br>
<br>
'<br>
' Visual Basic 4.0 definitions file for use with<br>
' PDH.DLL...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.