Solved

icq style net detection

Posted on 1998-10-08
5
206 Views
Last Modified: 2013-11-20
I'm trying to find a way to receive some sort of callback or message notification when a network connection as been established.
I know RasConnectionNotification is suppose to do this (I think), but it is only supported by NT and Win98. I'd like to know how icq did this (under 95).
0
Comment
Question by:kisstian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 6

Expert Comment

by:snoegler
ID: 1323131
Just a thought:
Why not just polling the connection status every 100 msec:

RasEnumConnection()
for( all connections ) {
  if (RasGetConnectStatus(hRasConn,&rasConnStatus)==0)
    // check for connection
}

As these functions should not consume too much time ( i don't know it exactly ), this is maybe
an easy way.
I think you also could write a RASAPI32.DLL ( or dynamically 'subclass' the functions using
a VxD) to catch calls to RasDial, but this is much more work.
0
 

Author Comment

by:kisstian
ID: 1323132
Thanks! Sounds good.
But I think I will try to write a RASAPI32.DLL to trap calls to RasDial.
The reason is I'm looking for minimal resource hogging while not in use.
0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1323133
ICQ net detection isn't invoked every 100msecs, it's more like 5-10secs, it won't cause much overload on the system. It doesn't worth writing a VXD
0
 

Accepted Solution

by:
TangCheng earned 100 total points
ID: 1323134
  ICQ's online notify is sent by ICQ server.
   If your friend online his ICQ, His ICQ will send online query message to ICQ server, Then ICQ server will save his online status.
   When your ICQ send query message to server(this message is auto send by your ICQ to query some information every some time) server will return your friend online message to your ICQ.
   You can use socket message spy tool to find it. I use a spy tool(made by myself) to spy ICQ message, then I can get this result.
 
0
 

Author Comment

by:kisstian
ID: 1323135
I will close this question. Seeing how there does not seem be anybody who as actually done some of this stuff before. I guess I'll roll my own little ras.dll and monitor connections/disconnections. But if anybody does get more thoughts on this please drop a line: kisstian@dsuper.net
Thanks all for responding
0

Featured Post

Do you have a plan for Continuity?

It's inevitable. People leave organizations creating a gap in your service. That's where Percona comes in.

See how Pepper.com relies on Percona to:
-Manage their database
-Guarantee data safety and protection
-Provide database expertise that is available for any situation

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

623 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