News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Sent/Received bytes in LAN status ?

Started by Slugsnack, May 21, 2009, 12:25:05 PM

Previous topic - Next topic

Slugsnack



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.

UtillMasm

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

Slugsnack

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 ) ?