Solved

Creating phone book entry in RAS

Posted on 1998-07-03
3
278 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
[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
  • 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

726 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