After much searching, I am at a loss here.

How do I hangup an internet connection that my program did not create. I don't know what the connection number is; so I can't put a value in dwconnection and call InternetHangUp. InternetAutoDialHangup does not work. So, what else is there out there?

Send an AT command to the modem, somehow? Surely not?

Posted on 2003-02-09 17:52:15 by GreenScreenAlternator
This snippet has worked well for over a year now. It's part of a program that drops the dial-up and Internet browsers on a keyboard shortcut.

Enjoy your work, P1

include \MASM32\INCLUDE\rasapi32.inc

l_Buffer_Size dd ?
l_Conn_Count dd ?

;Find Active Connections.
mov l_RASCONN.dwSize, sizeof RASCONN + 1
mov l_Buffer_Size, sizeof l_RASCONN
invoke RasEnumConnections, addr l_RASCONN, addr l_Buffer_Size, addr l_Conn_Count
.if eax != 0
jmp TheEnd
invoke RasHangUp, l_RASCONN.hrasconn

Posted on 2003-02-10 08:49:02 by Pone
Thank you Pone

This is exactly what I have been searching for.

I thought I must be missing something and that something is the RAS functions.

So much to learn. So little time........
Posted on 2003-02-10 13:37:49 by GreenScreenAlternator