







![]() ![]() |
DotRas SDK Documentation |
RasEntry..::..GetCredentials Method (RasPreSharedKey) |
RasEntry Class See Also Send Feedback |
![]() |
Retrieves the credentials for the entry.
Namespace: DotRas
Assembly: DotRas (in DotRas.dll) Version: 1.3.5166.33435 (1.3.0.0)
Syntax
C# |
---|
public NetworkCredential GetCredentials( RasPreSharedKey key ) |
Visual Basic |
---|
Public Function GetCredentials ( key As RasPreSharedKey ) As NetworkCredential |
Visual C++ |
---|
public: NetworkCredential^ GetCredentials( RasPreSharedKey key ) |
F# |
---|
member GetCredentials : key : RasPreSharedKey -> NetworkCredential |
Parameters
- key
- Type: DotRas..::..RasPreSharedKey
The pre-shared key to retrieve.
Return Value
Type: NetworkCredentialThe credentials stored in the entry, otherwise a null reference (Nothing in Visual Basic) if the credentials did not exist.
Remarks
Windows XP and later: This method is supported.
Exceptions
Exception | Condition |
---|---|
System..::..InvalidOperationException | The entry is not associated with a phone book. |
System..::..UnauthorizedAccessException | The caller does not have the required permission to perform the action requested. |