Solved

icq style net detection

Posted on 1998-10-08
5
198 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
  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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Rewrite URL With Encoded Characters 6 64
dog bark java program 15 81
lucky13 challenge 11 111
Change to event 1 72
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

763 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

8 Experts available now in Live!

Get 1:1 Help Now