Sorry, I should have been clearer in my question... I wasn't looking for equivalent sample code (I am planning to try writing equivalent sample code myself).
What I am looking for is an equivalent library for FPC/Lazarus that would allow me to access the Windows PerformanceCounters.
I guess from your reply that WinApi is the way to go, but I can't find any calls that seem equivalent to the ones used in the VB sample code, for example:
PerformanceCounterCategory.Exists("LogicalDisk")
ReadCounter = New PerformanceCounter("LogicalDisk", "Disk Read Bytes/sec", "_Total")
R = ReadCounter.NextValue
Sorry, my original question was pretty badly written.
-FM