Dialing gprs modem programatically

Posted on 2006-05-02
Last Modified: 2013-12-09
hi ,
      I have a modem equipped with gprs enabled sim.I am working in windows2000.I connected to gprs network using my dial-up connection.After some time,it gets disconnected. I need some way to dial the gprs modem(using  number *99***1#) programatically in Delphi programming language.    
Question by:Asmitagoyal
    LVL 13

    Expert Comment

    Not sure about delphi but I dial out my GPRS connection named "GPRS-DialUP" using the following code in VB6.....

    Public Declare Function InternetDial Lib "wininet.dll" Alias "InternetDialA" (ByVal hwndParent As Long, ByVal strEntryName As String, ByVal dwFlags As Long, lpdwConnection As Long, ByVal dwReserved As Long) As Long

    Call InternetDial(Me.hWnd, "GPRS-DialUP", 2&, HandleConnection, 0&)

    LVL 13

    Accepted Solution

    From a website I have found the following code in Delphi that will dial the default code....

    To dial the default Dial-Up Networking Connection, you can use the following Function:  (Returns True if successfull)

    Uses Registry, windows;

    Function DUNDialDefault(Hide : Boolean) : Boolean;
    // Show or hide the dial-up dialog
    var Reg : TRegistry;
    var TempResult : Boolean;
    var Name, con : String;
    var ASW : Integer;
    Reg := TRegistry.Create;
    Reg.RootKey := HKEY_CURRENT_USER;
    if Reg.OpenKey('\RemoteAccess', False) then
        TempResult := True;
        Name := Reg.ReadString('Default');
    else begin
    tempresult := False;
    if TempResult = True then
        if Hide = True then ASW := SW_HIDE
        else ASW := SW_SHOWDEFAULT;
        con := 'rnaui.dll,RnaDial ' + Name;
        ShellExecute(0, nil, 'rundll32.exe' , PChar
                      (con), 'C:\windows\', ASW);
    Result := tempResult;


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    MAC Filtering: MAC filtering is like handing a list of names to a doorman. If someone comes to the door and mentions a name, this name is checked by the doorman on his list and granted or denied access by this. This means that if someone menti…
    In this article I will describe how to setup a Cisco WLC 5508 to work with Apple's Bonjour protocol across VLANs.  I will also discuss using screen mirroring and Airplay on an AppleTV v3.  This article covers the wireless network only and requires m…
    This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
    Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

    758 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

    14 Experts available now in Live!

    Get 1:1 Help Now