Solved

Creating phone book entry in RAS

Posted on 1998-07-03
3
267 Views
Last Modified: 2013-12-03
Hi,

How can I create a new phone book entry without displaying the dialob box that
make this possible.

The function 'RasCreatePhonebookEntry' displays a dialog box in which the user types information
for the phone book entry. But I want to create one without this dialog box.

I samply want to create a default one.

It must works under win95 at WinNT4.

Thanks,
Mike
0
Comment
Question by:mike_marquet
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
BlackMan earned 20 total points
ID: 1409350
You need the RAS API Extensions found at http://www.microsoft.com/win32dev/apiext/rasapi.htm

Then you can use the following procedure:
The RasSetEntryProperties functions changes the properties of a specified phonebook entry. This function can also be used to create a new phonebook entry.

0
 

Author Comment

by:mike_marquet
ID: 1409351
When I call this function I became systematically
ERROR_INVALID_PARAMETER. Why ?

Source code :
------------------

void MyApp::OnMenu_SetDefaultEntry
 {
  if (RasValidateEntryName(NULL, "My Entry")) return;

  RASENTRY stRasEntry = {0};
  DWORD    dwSize, dwError;

  dwSize = stRasEntry.dwSize = sizeof(RASENTRY);

  dwError = RasSetEntryProperties(NULL, "My Entry", &stRasEntry, dwSize, NULL, 0);
  if (dwError)
   AfxMessageBox("ERROR");
 }

0
 
LVL 7

Expert Comment

by:BlackMan
ID: 1409352
I'm soyyr, I can't help you, I've never used it myself..
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 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