Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DFÜ/RAS Bytes sent/received

Posted on 1999-07-16
17
Medium Priority
?
233 Views
Last Modified: 2010-04-06
Hi ! How do I get the total bytes sent/received since the last net logon ? There is a key HKEY_DYN_DATA in the registry but how do I convert the values into an integer value ? I want to get the values during a connection, to
measure the traffic by stopping the time and the bytes sent/received in this time...

thanks
ItsMe
0
Comment
Question by:ItsMe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 5
17 Comments
 
LVL 15

Expert Comment

by:simonet
ID: 1389084
You mentioned RAS on the message title. The component below allows you check the number of bytes sent/received on a RAS connection:

http://www.magsys.co.uk/delphi/ 

Yours,

Alex
0
 

Author Comment

by:ItsMe
ID: 1389085
I mean the app, which you use to dial into the internet. it saves the bytes send/received in the registry. How can I convert this values to integer ?

regards
ItsMe
0
 

Author Comment

by:ItsMe
ID: 1389086
Its the key HKEY_DYN_DATA\PerfStats\StatData
And the values:
1. Dial-Up Adapter\TotalBytesRcvd
2. Dial-Up Adapter\TotalBytesXmit

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 17

Expert Comment

by:inthe
ID: 1389087
hi,
try this while your on the net to test and see if it works for ya:

Function GetRasStatus:Longint;
var
MyRegistry:TRegistry;
begin
MyRegistry:=TRegistry.Create;
With MyRegistry do begin
RootKey:=HKEY_DYN_DATA;
try
OpenKey('PerfStats\StatData',True);
ReadBinaryData('Dial-Up Adapter\TotalBytesRcvd',Result,SizeOf(Result));
CloseKey;
finally
end;
end;
MyRegistry.Free;
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage(inttostr(getrasstatus));
end;

Regards Barry
0
 

Author Comment

by:ItsMe
ID: 1389088
Hi Barry ! It shows me always the same value (1527)
even I'm loading datas. I think it is the right key ?
I want to get the value of bytes transmitted/received in
a special time which I want to measure by stopping the time with a timer.

regards
ItsMe
0
 

Author Comment

by:ItsMe
ID: 1389089
Hi Barry ! It shows me always the same value (1527)
even I'm loading datas. I think it is the right key ?
I want to get the value of bytes transmitted/received in
a special time which I want to measure by stopping the time with a timer.

regards
ItsMe
0
 
LVL 17

Expert Comment

by:inthe
ID: 1389090
>>It shows me always the same value (1527)

thats strange i tried while online and every time i click the button i get a different value .
if you want make a small demo of what you have and send to Legend@Enterprise.Net to see why it not work for you.
Regards Barry
0
 

Author Comment

by:ItsMe
ID: 1389091
Hi Barry, did my e-Mail arrive ?
0
 
LVL 17

Expert Comment

by:inthe
ID: 1389092
yes , and i change all the reg keys and none of them seem stable.
are you sure these are correct reg keys?
on looking around the net the StatData key
seems to be the one to use but it is far from stable or correct in its readings so not sure where to go from here..
0
 

Author Comment

by:ItsMe
ID: 1389093
As I heared its the right key. During a ras connection, you can see the bytes changing ...
0
 
LVL 17

Expert Comment

by:inthe
ID: 1389094
i coul also see the bytes changing when not connected ,just by moving the form around???that was weird
0
 

Author Comment

by:ItsMe
ID: 1389095
Thats interesting .... So the wrong key ?
0
 

Author Comment

by:ItsMe
ID: 1389096
But how do I get the bytes ? Shall I read the value from the tooltip which is shown in the systray ??? :-)
0
 

Author Comment

by:ItsMe
ID: 1389097
So perhaps somebody else knows how to get this value ?
0
 

Author Comment

by:ItsMe
ID: 1389098
Hi Barry, I think its o.k. if you answer the question. I'll find the key.

thanks
ItsMe
0
 
LVL 17

Accepted Solution

by:
inthe earned 80 total points
ID: 1389099
do us a favor and let me know what it is ,i looked evrywhere but all the keys seem not correct.
0
 

Author Comment

by:ItsMe
ID: 1389100
If I find it I'll tell you ...
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question