Solved

how? ICQ netdetect works.

Posted on 1998-10-17
4
201 Views
Last Modified: 2013-12-03
My question is:

How does ICQ NDetect (or any other program with the same functionality) detect that you suddenly are connected to the intenet? (My ICQ NDetect activates when I log on to my computer. It does 'nothing' until you get connected to the internet or when you disconnect.)

I don't want any code, just let me now what technic it uses.

Does it use a timer that checkes for a connection every second? Is it this simple or can it be done any other way?


  /saam
0
Comment
Question by:saam
  • 2
4 Comments
 
LVL 1

Author Comment

by:saam
ID: 1415352
Edited text of question
0
 

Expert Comment

by:ShadowHawk071998
ID: 1415353
Hi.
I'm not too sure here, But I guess they use Hooks to do it.
Am I right?
Hooks are means of writing procedure that are triggers when certain events in the OS occur. for example : You can hook to the keyboard, and have your procedure run each time a key was pressed.
I hope this helps a bit...
0
 
LVL 2

Accepted Solution

by:
avico earned 30 total points
ID: 1415354
As you guessed, it is probably done by using a timer.
In Win32 programming you can define a timer. When this timer expires, Windows sends a WM_TIMER message to your application, which in this case tries to establish a winsock connection on to a specific address in the net.

The WM_TIMER message differs from all other window messages in the way that it gets the lowest priority in the message queue to a window. Hence, this timer is often not occurate, nevertheless, it does not disturb much to the application or to windows overall performance.

Hope it helped...
0
 
LVL 1

Author Comment

by:saam
ID: 1415355
thanks to avico and  ShadowHawk!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question