0

如何为RasPreSharedKeyc#中的条目添加?在VB中有:

Imports DotRas
...
VpnEntry.UpdateCredentials(RasPreSharedKey.Client, PresharedKey)

但是在c#中没有RasPreSharedKey类型...

4

1 回答 1

0

RasPreSharedKeyC# 的 DotRas 库中肯定有:

// Type: DotRas.RasPreSharedKey
// Assembly: DotRas, Version=1.3.5166.33433, Culture=neutral, PublicKeyToken=b378f04384b7892a
// MVID: 2B7681AE-B8A5-4283-B263-4CFBA2B063B1
// Assembly location: C:\Program Files (x86)\DotRas SDKs\v1.3\Libraries\NET40\WIN2K8\DotRas.dll

namespace DotRas
{
  /// <summary>
  /// Defines the pre-shared keys.
  /// 
  /// </summary>
  /// 
  /// <remarks>
  /// 
  /// <para>
  /// <b>Known Limitations:</b>
  /// <list type="bullet">
  /// 
  /// <item>
  /// This type is only available on Windows XP and later operating systems.
  /// </item>
  /// 
  /// </list>
  /// 
  /// </para>
  /// 
  /// </remarks>
  public enum RasPreSharedKey
  {
    Client,
    Server,
    Ddm,
  }

你有什么样的错误?

于 2015-10-05T18:00:26.963 回答