Solved

icq style net detection

Posted on 1998-10-08
5
199 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now