The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Slugsnack on May 21, 2009, 12:25:05 PM

Title: Sent/Received bytes in LAN status ?
Post by: Slugsnack on May 21, 2009, 12:25:05 PM
(http://i121.photobucket.com/albums/o222/Slugsnack/Sent.jpg)

does anyone know how i would go about getting the sent/received bytes displayed on that window ?  i assume there's some sort of winapi for it.  i already did a 'stupid' method which was globally hooking some apis, for example send and reading off 'len'.  other than that being a stupid method though, it doesn't take into account if the call were to fail in which case no bytes would be sent.
Title: Re: Sent/Received bytes in LAN status ?
Post by: UtillMasm on May 21, 2009, 12:44:50 PM
RasXxx

Like RasPhonebookDlgA:
comment #
@set source=RasPhonebookDlgA
@set path=\masm32\bin
@set include=\masm32\include
@set lib=\masm32\lib
@ml /c /coff /Fo%source%.obj /nologo %source%.asm
@link /subsystem:windows /out:%source%.exe /nologo %source%.obj
@pause
#
.386
.model flat,stdcall
include kernel32.inc
include rasdlg.inc
includelib kernel32.lib
includelib rasdlg.lib
.data?
pMemory dd ?
.code
start:push 28h
push 8h
call GetProcessHeap
push eax
call HeapAlloc
mov dword ptr ds:[eax],28h
push eax
mov pMemory,eax
push 0
push 0
call RasPhonebookDlgA
push pMemory
push 0
call GetProcessHeap
push eax
call HeapFree
push 0
call ExitProcess
end start
Title: Re: Sent/Received bytes in LAN status ?
Post by: Slugsnack on June 07, 2009, 12:38:07 PM
sorry for bumping up an old thread.  i was internet-less for about 2 weeks : [ 

utilmasm that opens up a dialogue box, do you know a way i could just go and get those 2 numbers instead ( 4,157,642 & 28,334,359 ) ?