Solved

Telephone number...

Posted on 1998-12-15
8
120 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
  • 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

705 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

20 Experts available now in Live!

Get 1:1 Help Now