Monitoring dialling - how?
-
Hi all, I'm trying to find out how I can 'get into' the ras dial process before a connection is established. Basically, I need to be able to measure the time it takes to carry out the various stages of dialling a connection - whether or not it's my app which instigates the dial. Currently, I measure the dialling stages (dial, connect, auth, projection, etc) if I dial myself (using a RasDialFun and RasDial). I can measure the timings for the later stages of a dial (everything from Auth onwards) by using RasConnectionNotification to indicate a new connection being made, and then by polling with RasGetConnectStatus to see the later connection stages change. However, I have no way of detecting a new dial occurrence before the physical link is established. Ideally, I'd like to be able to detect the dialling as soon as it occurred, and monitor the time it takes for the call to be answered (including failures, such as line engaged, etc) for *any* connection, instigated by any app (or even the user dialling via DUN). Is this possible? Thanks Mark ________________________ http://www.webreaper.net
-
Hi all, I'm trying to find out how I can 'get into' the ras dial process before a connection is established. Basically, I need to be able to measure the time it takes to carry out the various stages of dialling a connection - whether or not it's my app which instigates the dial. Currently, I measure the dialling stages (dial, connect, auth, projection, etc) if I dial myself (using a RasDialFun and RasDial). I can measure the timings for the later stages of a dial (everything from Auth onwards) by using RasConnectionNotification to indicate a new connection being made, and then by polling with RasGetConnectStatus to see the later connection stages change. However, I have no way of detecting a new dial occurrence before the physical link is established. Ideally, I'd like to be able to detect the dialling as soon as it occurred, and monitor the time it takes for the call to be answered (including failures, such as line engaged, etc) for *any* connection, instigated by any app (or even the user dialling via DUN). Is this possible? Thanks Mark ________________________ http://www.webreaper.net
I assume you are using the callback in
RasDial
e.g.RasDialFunc(UINT unMsg, RASCONNSTATE rasconnstate, DWORD dwError)
and checking rasconnstate for all states such asRASCS_OpenPort
If not I can post the states I check. I never managed to check for a line engaged, what happens is when a line is enaged you get a timeout notification, I would like to teminate the call on an engaed tone, so if you find out how I would be very interested to find out how you did it!
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
-
I assume you are using the callback in
RasDial
e.g.RasDialFunc(UINT unMsg, RASCONNSTATE rasconnstate, DWORD dwError)
and checking rasconnstate for all states such asRASCS_OpenPort
If not I can post the states I check. I never managed to check for a line engaged, what happens is when a line is enaged you get a timeout notification, I would like to teminate the call on an engaed tone, so if you find out how I would be very interested to find out how you did it!
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
That's exactly what I'm doing, and it works perfectly - as long as I perform the dial myself. However, I also want to monitor the dialling even if it's performed by another app, or by the user manually starting a connection via dial-up networking. In the latter case, whilst I can get an
HRASCONN
handle by enumerating RAS connections, it only 'appears' after theRASC_Auth
status occurs - meaning I can't time the actually dialling part of the connection unless I initiate it. Regarding the engaged error issue, I'm not sure - but it's something I have to handle/detect, so if I find a solution I'll post it back in this thread. :-D ________________________ http://www.webreaper.net