Re: [Dev-C++] Network monitor - Question
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2003-04-07 14:39:25
|
DWORD GetIpNetTable( PMIB_IPNETTABLE pIpNetTable, // buffer for mapping table PULONG pdwSize, // size of buffer BOOL bOrder // sort by IP address ); Are you setting your dwSize to the size of the buffer before calling GetIpNetTable()? Else the call might overwrite the buffer, and thereby destroy other variables in your program. /Per W On Mon, 7 Apr 2003, Daniel Glenfield wrote: > > > Hi, this was perfect for me and I didn't even ask the question! However > there is something I'm having trouble with relating to this set of > functions. > > I'm using VC++ (boo! lol) and using MFC I've built a dialog-based app that > gets info with GetIfTable() and some others. One of these functions is > GetIpNetTable() which gets the ARP table. > > The problem is this - after much debugging I find that when I call > GetIpNetTable() the window handle becomes 0 !!!! So while everywhere else I > can call SetDlgItemText() to put the buffer contents into an edit box, I now > get Assert errors (even if I try to exit the function!) because hwnd is 0! > > Has anyone heard of this? I've not found it on google. > > Daniel > > > > > >From: Zodiaq <zo...@ac...> > >Reply-To: Zodiaq <zo...@ac...> > >To: Dev...@li... > >Subject: Re: [Dev-C++] Network monitor > >Date: Sun, 6 Apr 2003 18:13:13 +0200 > > > >Hello Lambdabit and all Dev-C++ users, > > > >Sunday, April 6, 2003, 4:33:46 PM, Lambdabit wrote as follows: > > > >LJGS> how can I get the speed of my net interface's connection and the > >packages sent and received? > > > >By calling Win32 API function named GetIfTable you get CURRENT bytes > >sent and received for every interface (including loopback)... if you > >call this function every 1sec (using timer) you can easly obtain speed > >in bytes... but remember that this gives you total network load - > >every byte of packets counts... > >for more info and examples check msdn.microsoft.com > > > >LJGS> Thanks! > > > >-- > >regards, Zodiaq > > > > > > > >------------------------------------------------------- > >This SF.net email is sponsored by: ValueWeb: > >Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > >No other company gives more support or power for your dedicated server > >http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > >_______________________________________________ > >Dev-cpp-users mailing list > >Dev...@li... > >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > _________________________________________________________________ > Get Hotmail on your mobile phone http://www.msn.co.uk/mobile > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ValueWeb: > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > No other company gives more support or power for your dedicated server > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |