davisa
asked on
Determining internet connection type/speed with Delphi
The basic function I'm trying to perform is to determine whether or not a user's Internet connection may be via a modem (or similarly slow device) or not, without going to the trouble of trying to download a file and determine transfer rate. My plan was to do so by checking the hardware speeds of any connected/active network interfaces; modems won't be higher than 115200bps, while network cards will be 10Mbps or higher. It's imperfect, given that I can't determine which interface will actually be used to access the Internet, but adequate and theoretically easy.
I had planned to use the function GetIfTable in IPHLPAPI.DLL, as that looked like it would do everything I need; however, it appears that that API doesn't consider a modem to be a network interface, and as such it doesn't return any information on modems in the system.
So, can anyone shed some light on how I might do this?
I had planned to use the function GetIfTable in IPHLPAPI.DLL, as that looked like it would do everything I need; however, it appears that that API doesn't consider a modem to be a network interface, and as such it doesn't return any information on modems in the system.
So, can anyone shed some light on how I might do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ooops, missed the Delphi part, but the idea should be clear...
ASKER
I wasn't aware of that particular function; that's what I get for being a Windows API novice, I guess. I'll test that out now, and accept your comment if it works. Thanks!
This works out well, too, since I just found out that GetIfTable doesn't seem to return anything about modems anyway.
This works out well, too, since I just found out that GetIfTable doesn't seem to return anything about modems anyway.
ASKER
Works perfectly for my purposes. Thanks again!