I need to read certain numbers (dialup Uploaded and Downloaded) every 10 or so seconds. Until now, I have been using getSystemPerformanceData, but after last modifications to my source code (some 400+ lines), it ocassionaly missfires.
I have another application which counts the same data (DUMeter) but stores the data in the registry. I though about reading it using the regPlulgin. But, I did not manage to understand it from the first reading, as there are several possible commands, so I hope someone with experience could point me :). As I have not been programming for some years now, I am quite rusty :( Data in bytes is stored in 4 bytes inside the 80 bytes REG_BINARY string. How to read it and convert 4 particular bytes to decimal numbers? I have identified the bytes needed. actual registry data is here: [HKEY_LOCAL_MACHINE\SOFTWARE\Hagel\DU Meter] "InstDir"="C:\\Program Files\\DU Meter" "Totals"=hex:88,34,2d,00,00,00,00,00,e1,fa,07,00,00,00,00,00,e4,2e,00 ,00,00,00,\ 00,00,4b,df,43,0a,00,54,e3,40,3f,d4,0c,00,00,00,00,00,63,22,02,00,00, 00,00,\ 00,2b,10,00,00,00,00,00,00,00,00,00,00,60,54,e3,40,fc,01,00,00,00,00, 00,00,\ fc,01,00,00,00,00,00,00 I need the fastest way to read the following 4 bytes from 0x28 for UL and another 4 from 0x20 for DL, converting them to decimal: 0x20: 3f,d4,0c,00 -> 0x000cd43f -> 840767 bytes DL 0x28: 63,22,02,00 -> 0x00022263 -> 139875 byts UL In C, I would use a pointer to the address and properly sized variable on the receiving end, I guess. I will try to solve it myself now, but I would appreciate help on finding the fastest way! Regards and many thanks! Davor
