Ik wou een programmatje maken dat de serverstatus afleest. Hiervoor heb ik ff gezocht, en kreeg dit op IRC:
Nu heb ik dat geprobeerd, maar ik kom er niet uit. Ik draai zelf ook geen Win2k/XP en laat staan een IIS server, maar kan iemand me hierbij helpen?Op weetikveel screef Jo het volgende:
for IIS: use pdh.dll
these functions:
code:
1 2 3 4 5 6 Public Declare Function PdhVbOpenQuery Lib "PDH.DLL" (ByRef QueryHandle As Long) As Long Public Declare Function PdhCloseQuery Lib "PDH.DLL" (ByVal hQuery As Long) As Long Public Declare Function PdhVbAddCounter Lib "PDH.DLL" (ByVal QueryHandle As Long, ByVal CounterPath As String, ByRef CounterHandle As Long) As Long Public Declare Function PdhRemoveCounter Lib "PDH.DLL" (ByVal CounterHandle As Long) As Long Public Declare Function PdhCollectQueryData Lib "PDH.DLL" (ByVal QueryHandle As Long) As Long Public Declare Function PdhVbGetDoubleCounterValue Lib "PDH.DLL" (ByVal CounterHandle As Long, ByRef CounterStatus As Long) As Double
Note that this is in C++ ^
you can retrieve about anything using pdh.dll (but it's 2k, and possibly XP only)
code:
1 %SystemRoot%\system32\perfmon.msc /s
try running that, it'll show all the possible statistics
right-click the right pane -> add counter
This message was sent on 100% recyclable electrons.