| | |
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Sep 2005
Posts: 4
Reputation:
Solved Threads: 0
hi
i try building a bandwith monitor with the report of total
connections to/from my pc so far i do a report of ip source/destination
but now i want to know the lenght of data that belong to each ip.
for example: i want to know de down/upload of each ip
i download examples of bandwith monitor but none of them have that information down/upload of each ip
any one can help me?
thanks a lot
bybruno
i try building a bandwith monitor with the report of total
connections to/from my pc so far i do a report of ip source/destination
but now i want to know the lenght of data that belong to each ip.
for example: i want to know de down/upload of each ip
i download examples of bandwith monitor but none of them have that information down/upload of each ip
any one can help me?
thanks a lot
bybruno
What object are you using for the ip information. There should be a method there to calculate the bytes used.
.: We may acquire liberty, but it is never recovered if it is lost :.
irc://irc.rizon.net/#itf
irc://irc.rizon.net/#itf
•
•
Join Date: Sep 2005
Posts: 4
Reputation:
Solved Threads: 0
here is some part of the code that get the ip:
Private Declare Function GetProcessHeap Lib "kernel32" () As Long
Private Declare Function AllocateAndGetTcpExTableFromStack Lib "iphlpapi.dll" (pTcpTableEx As Any, ByVal bOrder As Long, ByVal heap As Long, ByVal zero As Long, ByVal flags As Long) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
''there we get the ip
CopyMemory nRemoteAddr, ByVal pTablePtr + (pDataRef + 16), 4
Public Function GetIPAddress(dwAddr As Long) As String
Dim arrIpParts(3) As Byte
CopyMemory arrIpParts(0), dwAddr, 4
GetIPAddress = CStr(arrIpParts(0)) & "." & _
CStr(arrIpParts(1)) & "." & _
CStr(arrIpParts(2)) & "." & _
CStr(arrIpParts(3))
End Function
''and the result display there
MsgBox GetIPAddress(nRemoteAddr)
now i want to know who get the down and upload information
for that ip.
can you help me?
thanks a lot
bybruno
Private Declare Function GetProcessHeap Lib "kernel32" () As Long
Private Declare Function AllocateAndGetTcpExTableFromStack Lib "iphlpapi.dll" (pTcpTableEx As Any, ByVal bOrder As Long, ByVal heap As Long, ByVal zero As Long, ByVal flags As Long) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
''there we get the ip
CopyMemory nRemoteAddr, ByVal pTablePtr + (pDataRef + 16), 4
Public Function GetIPAddress(dwAddr As Long) As String
Dim arrIpParts(3) As Byte
CopyMemory arrIpParts(0), dwAddr, 4
GetIPAddress = CStr(arrIpParts(0)) & "." & _
CStr(arrIpParts(1)) & "." & _
CStr(arrIpParts(2)) & "." & _
CStr(arrIpParts(3))
End Function
''and the result display there
MsgBox GetIPAddress(nRemoteAddr)
now i want to know who get the down and upload information
for that ip.
can you help me?
thanks a lot
bybruno
It looks like in the CopyMemory function the ByVal is the length of the data passed from destination to source or vice versa. Check this value debug.print byVal in the function to see what it contains with different pings , and arps.
.: We may acquire liberty, but it is never recovered if it is lost :.
irc://irc.rizon.net/#itf
irc://irc.rizon.net/#itf
Text1.Text = MonthName(Month(DateAdd("m", -1, Date)))
.: We may acquire liberty, but it is never recovered if it is lost :.
irc://irc.rizon.net/#itf
irc://irc.rizon.net/#itf
•
•
Join Date: Sep 2005
Posts: 2
Reputation:
Solved Threads: 0
Hi
I Have Some Problem In Visual Basic Code. I Have Two Dttpicker - 1) From And 2) To . There Are Three Text Box - 1) First Text Box Directly Goes To From Date (first Dtpicker) 2) Second Goes To Date(second Dtpicker) 3) Difference Between Two Date(no Of Leave). Our Validation Is When No Of Leave Exceeds 30 Days It Will Automatically Display The Message Box Displays "leave Without Pay" . Please Help Help Me.
Thanking You
Surojit
I Have Some Problem In Visual Basic Code. I Have Two Dttpicker - 1) From And 2) To . There Are Three Text Box - 1) First Text Box Directly Goes To From Date (first Dtpicker) 2) Second Goes To Date(second Dtpicker) 3) Difference Between Two Date(no Of Leave). Our Validation Is When No Of Leave Exceeds 30 Days It Will Automatically Display The Message Box Displays "leave Without Pay" . Please Help Help Me.
Thanking You
Surojit
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: How to set user rights in ms.access from vb6
- Next Thread: If functions
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





