[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Telephone number...

Posted on 1998-12-15
8
Medium Priority
?
129 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 800 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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

649 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