|
|
|
Global Const HKEY_DYN_DATA = &H80000006
Global Const KEY_QUERY_VALUE = &H1
Global Const ERROR_SUCCESS = 0&
Declare Function RegOpenKeyEx Lib "advapi32.dll"
Alias "RegOpenKeyExA" (ByVal hkey As Long, ByVal
lpSubKey As String, ByVal ulOptions As Long, ByVal
samDesired As Long, phkResult As Long) As Long
Declare Function RegQueryValueEx Lib "advapi32.dll"
Alias "RegQueryValueExA" (ByVal hkey As Long, ByVallpValueName As String, ByVal lpReserved As Long, lp-Type As Long, lpData As Any, lpcbData As Long) As Long
Declare Function RegCloseKey Lib "advapi32.dll" (By Val hkey As Long) As Long
Dim hkey As Long
Dim lData As Long
Dim lType As Long
Dim lResult As Long
lResult = RegOpenKeyEx(HKEY_DYN_DATA,
"PerfStats\StatData", 0, KEY_QUERY_VALUE, hkey)
If lResult = ERROR_SUCCESS Then
lResult = RegQueryValueEx(hkey, "VMM\cPageIns", 0&,
lType, lData, 4&)
End If
lResult = RegCloseKey(hkey)
|
|
|