[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Creating phone book entry in RAS

Posted on 1998-07-03
3
Medium Priority
?
283 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 60 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

834 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