Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy
rassetentryproperties (rasapi32)
 
.
Summary
The RasSetEntryProperties function changes the connection information for an entry in the phone book or creates a new phone-book entry.

C# Signature:

/// <summary>
/// Changes the connection information for an entry in the phone book or creates a new phone-book entry.
/// </summary>
/// <param name="lpszPhonebook">Pointer to a null-terminated string that specifies the full path and file name of a phone-book (PBK) file.
/// If this parameter is NULL, the function uses the current default phone-book file.</param>
/// <param name="lpszEntry">Pointer to a null-terminated string that specifies an entry name.
/// If the entry name matches an existing entry, RasSetEntryProperties modifies the properties of that entry.
/// If the entry name does not match an existing entry, RasSetEntryProperties creates a new phone-book entry.</param>
/// <param name="lpRasEntry">Pointer to the RASENTRY structure that specifies the connection data to associate with the phone-book entry.</param>
/// <param name="dwEntryInfoSize">Specifies the size, in bytes, of the buffer identified by the lpRasEntry parameter.</param>
/// <param name="lpbDeviceInfo">This parameter is unused. The calling function should set this parameter to NULL.</param>
/// <param name="dwDeviceInfoSize">This parameter is unused. The calling function should set this parameter to zero.</param>
/// <returns></returns>
[DllImport("rasapi32.dll", SetLastError = true, CharSet = CharSet.Auto)]
private static extern Uint RasSetEntryProperties(
   string lpszPhonebook,
   string lpszEntry,
   ref RASENTRY lpRasEntry,
   int dwEntryInfoSize,
   IntPtr lpbDeviceInfo,
   int dwDeviceInfoSize);

VB Signature:

Declare Function RasSetEntryProperties Lib "rasapi32.dll" (TODO) As TODO

User-Defined Types:

None.

Alternative Managed API:

http://www.codeplex.com/DotRas

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

/// <summary>
/// Create or modify network connection.
/// </summary>
/// <param name="connectionName">Name of the network connection to create or modify.</param>
/// <param name="rasEntryStructure">RASENTRY structure containing connection settings.</param>
/// <returns>Enumerated RASERROR</returns>
public static RasError SetEntryProperties(string connectionName, RASENTRY rasEntryStructure)
{
     return (RasError)RasSetEntryProperties(null, connectionName, ref rasEntryStructure, Marshal.SizeOf(rasEntryStructure), IntPtr.Zero, 0);
}

Documentation

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions