Capture the Network Connection Details

I'm writing a code to capture the Newtowrk Connection status:Connected/disconnected; Duration; speed etc.
Can you please help me which Windows inbuild api i can use to do this task?
Will it be the advapi32.dll?
[223 byte] By [bruce_b] at [2007-11-20 9:53:59]
# 1 Re: Capture the Network Connection Details
^you may post also in the Network section.
Thread1 at 2007-11-9 19:36:05 >
# 2 Re: Capture the Network Connection Details
Thanks, i just did that... i'm hoping someone would help me soon...
bruce_b at 2007-11-9 19:37:05 >
# 3 Re: Capture the Network Connection Details
Take a look at the Connection part on this page. You will get most of the information from here
http://vbnet.mvps.org/index.html?code/network/index.html
Shuja Ali at 2007-11-9 19:37:59 >
# 4 Re: Capture the Network Connection Details
Thanks I checked in the link there, but nowhere it shows how we can capture the time we have the network connection started.
bruce_b at 2007-11-9 19:39:04 >
# 5 Re: Capture the Network Connection Details
Thanks I checked in the link there, but nowhere it shows how we can capture the time we have the network connection started.
I had written in my post, that you will get most of the information. Regarding the duration, I am still checking if there is anything available.
Shuja Ali at 2007-11-9 19:40:03 >
# 6 Re: Capture the Network Connection Details
I'm Trying to just pull the last login and logoff time
Finally I made some progress with this... I used the USER_INFO_3 Network management structures, My code looks like this

Private Type USER_INFO_3
usri3_last_logon As Long
usri3_last_logoff As Long
End Type

Private Declare Function NetUserGetInfo Lib "NETAPI32.DLL" _
(ServerName As Any, UserName As Any, _
ByVal Level As Long, _
bufptr As Long) As Long

....

lReturn = NetUserGetInfo(bytPDCName(0), bytUserName(0), 3, bufptr)
If (lReturn = ERROR_SUCCESS) Then

Call RtlMoveMemory(usrinfo, ByVal bufptr, Len(usrinfo))

'-- Get the last logon date --
lReturn = usrinfo.usri3_last_logon
dteLastLogon = DateAdd("s", lReturn, DateSerial(1970, 1, 1) + _
TimeSerial(0, 0, 0))
'-- Get the last logoff date --
lReturn = usrinfo.usri3_last_logoff
dteLastLogoff = DateAdd("s", lReturn, DateSerial(1970, 1, 1) + _
TimeSerial(0, 0, 0))

But I seem to not retrieve the date correctly can someone please help me with this? thanks a lot!!!!
bruce_b at 2007-11-9 19:41:08 >