Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Dialing gprs modem programatically

Posted on 2006-05-02
4
Medium Priority
?
1,298 Views
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.    
                             Thanks.
0
Comment
Question by:Asmitagoyal
  • 2
2 Comments
 
LVL 13

Expert Comment

by:imarshad
ID: 16584606
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&)

Imran
0
 
LVL 13

Accepted Solution

by:
imarshad earned 2000 total points
ID: 16584623
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;
begin
Reg := TRegistry.Create;
Reg.RootKey := HKEY_CURRENT_USER;
if Reg.OpenKey('\RemoteAccess', False) then
  begin
    TempResult := True;
    Name := Reg.ReadString('Default');
  end
else begin
tempresult := False;
end;
Reg.Free;
if TempResult = True then
  begin
    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);
end;
Result := tempResult;
end;

Imran
0

Featured Post

Who's Defending Your Organization from Threats?

Protecting against advanced threats requires an IT dream team – a well-oiled machine of people and solutions working together to defend your organization. Download our resource kit today to learn more about the tools you need to build you IT Dream Team!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Coaxial cable bending There are several factors that govern the selection of coaxial cable for your Machine to Machine (M2M) application: the location of cable runs, either indoor or outdoor, inside or outside an enclosure, maximum bending and the…
With the purchase of CloudCommand by Comcast customers are left in a bind as subscriptions expire and render the AP's disabled. The following will explain how to flash your Ubiquiti AP's with CloudCommand firmware back to Ubiquiti firmware. HOWTO…
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…
Suggested Courses

564 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