Solved

Telephone number...

Posted on 1998-12-15
8
125 Views
Last Modified: 2012-03-15
I need change then number for an RAS access in Windows 95. Somebody knows a way to make this?

PD: sorry, but my english is not so good!
0
Comment
Question by:Marcelito
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
8 Comments
 
LVL 4

Expert Comment

by:dwwang
ID: 1351147
goto http://www.magsys.co.uk/delphi/rascomp.zip
to download the RAS component , you can get all you want.

If you need do it by few lines of code, just look into the source code of this component
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1351148
Sorry, I just realize that the API RasSetEntryDialParams can modify any parameters except the phone number. So if this component does not help, just reject my answer :-(
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1351149
Hi, sorry for my boldness, but I found another API can do this:
RasSetEntryProperties

Function RasSetEntryProperties (      // ANGUS      -  from RNAPH.DLL
      lpszPhonebook,
      szEntry: PChar;
        lpbEntry: Pointer;
      dwEntrySize: Longint;
      lpbDeviceInfo: Pointer;
      dwDeviceInfoSize: Longint
      ): Longint; stdcall; external 'RNAPH.DLL'

You can look into the Win32 API's help to see detailed usage.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:dwwang
ID: 1351150
Hi, this is dwwang again :)

download this component, and this time you really get what you want:
http://mirror.aarnet.edu.au/delphi/ftp/d20free/d_ras.zip

I have tested it myself, so hopefully you can't reject my answer now ^_^
0
 

Author Comment

by:Marcelito
ID: 1351151
Can you send me an example?
Please, send me the response and I will accept!

Thanks!!
0
 
LVL 4

Accepted Solution

by:
dwwang earned 200 total points
ID: 1351152
OK, of course, I will arrange it and paste here or send to you!
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1351153
procedure TForm1.Button1Click(Sender: TObject);
var
  entry: LPRasEntry;
  entrySize, devinfoSize: Integer;
  entryName: string;

  begin
  entryName := 'YourDesiredEntryName';//such as "myconnection"
  entrySize := 0;
  devinfoSize := 0;

  if RasGetEntryProperties(nil, PChar(entryName),
      nil, entrySize, nil, devinfoSize) <> ERROR_BUFFER_TOO_SMALL then
    begin
    ShowMessage('RasGetEntryProperties failed.');
    Exit;
    end;

    entry := AllocMem(entrySize);
    entry^.dwSize := SizeOf(TRasEntry);
    RasGetEntryProperties(nil, PChar(entryName), entry, entrySize, nil, devinfoSize);

    entry^.dwSize := SizeOf(TRasEntry);
    StrPCopy(entry^.szLocalPhoneNumber, '1234567890');
    RasSetEntryProperties(nil, PChar(entryName),entry, SizeOf(TRasEntry), nil, 0)

   end;

This procedure is fully tested, for it to work, you must download the component as I suggested above, and use the ras.pas in the proper form.

Regards,
Wang
0
 

Author Comment

by:Marcelito
ID: 1351154
Excellent!!

It´s work perfectly!!

Thanks for the feedback!!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to debug For loops? 3 63
SUM 2 INTEGER ARRAYS INTO 1 10 111
TEMBEDDEDWB how can i change its user agent ? 8 84
how to resize animated Gif image in delphi ? 1 45
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

733 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