Get current network usage (upload/download)?
Get current network usage (upload/download)?
Hello, i am looking for a way to read out the current upload/download network usage on the system. Something like a network meter does.
Re: Get current network usage (upload/download)?
I think u could use GetAdaptersAddresses() https://docs.microsoft.com/de-de/window ... dfrom=MSDN
It returns a list of IP_ADAPTER_ADDRESSES structures.
Contained are those fields:
Its the current speed (up-/download) in bits per second.
I hope this works (convert the structure and import the function).
It returns a list of IP_ADAPTER_ADDRESSES structures.
Contained are those fields:
Code: Select all
ULONG64 TransmitLinkSpeed;
ULONG64 ReceiveLinkSpeed;
I hope this works (convert the structure and import the function).
Re: Get current network usage (upload/download)?
I am still not having any luck, Could a more experienced user make an example for it?
Re: Get current network usage (upload/download)?
Hi novablue,
you can search for 'IP_ADAPTER_ADDRESSES' on this forum and you will find a lot of sample codes.
Just the first to items I got on my search ...
viewtopic.php?f=13&t=67182&p=517038&hil ... ES#p517038
viewtopic.php?f=12&t=60322&p=498133&hil ... ES#p498133
Happy coding and stay healthy.
you can search for 'IP_ADAPTER_ADDRESSES' on this forum and you will find a lot of sample codes.
Just the first to items I got on my search ...
viewtopic.php?f=13&t=67182&p=517038&hil ... ES#p517038
viewtopic.php?f=12&t=60322&p=498133&hil ... ES#p498133
Happy coding and stay healthy.
Mostly running PureBasic <latest stable version and current alpha/beta> (x64) on Windows 11 Home