Link to home
Start Free TrialLog in
Avatar of mroberson
mroberson

asked on

Simple Question

Looking for the code for a click event that does the disconnect and closesd out the dialup networking.

What I want is to click the command button and have the click event disconnect and close out the dialup network.

Thanks
Avatar of tirupur_selva
tirupur_selva
Flag of United States of America image

This function will do it.

Private Declare Function InternetHangUp Lib "wininet.dll" (ByVal dwConnection As Long, ByVal dwReserved As Long) As Long

If you want the full coding, put your mail address here, I'll definitely help you, coz its quite big and difficult to understand if pasted here.
Regs
Selva

Avatar of mroberson
mroberson

ASKER

Here's my email I'd like to see the full code


Thanks
The function looks like an API function should go in the mod file or where?
I would like the full code here's my email

mroberso@concentric.net
I am looking for the click event code
ASKER CERTIFIED SOLUTION
Avatar of mcrider
mcrider

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Not what I am after getting the code some where else.
Heelp !
I hope you can help me. I think I am over my head here.
I am getting a compiler Error in between the '**'
What I am getting is    

Only comments may appear after End Sub, End Function, or End Property


Public Const RAS_MAXENTRYNAME As Integer = 256
            Public Const RAS_MAXDEVICETYPE As Integer = 16
            Public Const RAS_MAXDEVICENAME As Integer = 128
            Public Const RAS_RASCONNSIZE As Integer = 412
            Public Const ERROR_SUCCESS = 0&

            Public Type RasEntryName
                dwSize As Long
                szEntryName(RAS_MAXENTRYNAME) As Byte
            End Type

            Public Type RasConn
                dwSize As Long
                hRasConn As Long
                szEntryName(RAS_MAXENTRYNAME) As Byte
                szDeviceType(RAS_MAXDEVICETYPE) As Byte
                szDeviceName(RAS_MAXDEVICENAME) As Byte
            End Type

  LOOK HERE        
** Public Declare Function RasEnumConnections Lib _
            "rasapi32.dll" Alias "RasEnumConnectionsA" (lpRasConn As _
            Any, lpcb As Long, lpcConnections As Long) As Long **
Hi,
The complete code is on its way to you. Hope you find it useful.
Regs
Selva