OPC Studio User's Guide and Reference
GetCredentialByHost Method (_NetworkCredential2)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Net.ComTypes Namespace > _NetworkCredential2 Interface : GetCredentialByHost Method

The value represents a DNS computer name, e.g. "domain.com", "example.microsoft.com", or "135.5.33.19". Any string can be passed to this parameter (i.e. will not cause System.ArgumentException), but not all values make sense and will work when an operation using them is attempted. Under normal conditions, host names are not empty, and they do not contain specific disallowed characters (",~:!@#$%^&'(){} ").

The value of this parameter can be null (Nothing in Visual Basic).

The value of this parameter can be null (Nothing in Visual Basic).

Syntax
'Declaration
 
<CanBeNullAttribute()>
Function GetCredentialByHost( _
   ByVal host As String, _
   ByVal port As Integer, _
   ByVal authenticationType As String _
) As NetworkCredential2
'Usage
 
Dim instance As _NetworkCredential2
Dim host As String
Dim port As Integer
Dim authenticationType As String
Dim value As NetworkCredential2
 
value = instance.GetCredentialByHost(host, port, authenticationType)
[CanBeNull()]
NetworkCredential2 GetCredentialByHost( 
   string host,
   int port,
   string authenticationType
)
[CanBeNull()]
NetworkCredential2^ GetCredentialByHost( 
   String^ host,
   int port,
   String^ authenticationType
) 

Parameters

host

The value represents a DNS computer name, e.g. "domain.com", "example.microsoft.com", or "135.5.33.19". Any string can be passed to this parameter (i.e. will not cause System.ArgumentException), but not all values make sense and will work when an operation using them is attempted. Under normal conditions, host names are not empty, and they do not contain specific disallowed characters (",~:!@#$%^&'(){} ").

The value of this parameter can be null (Nothing in Visual Basic).

port
authenticationType

The value of this parameter can be null (Nothing in Visual Basic).

Return Value

This method can return null (Nothing in Visual Basic).

Remarks

This member or type is for use from COM. It is not meant to be used from .NET or Python. Refer to the corresponding .NET member or type instead, if you are developing in .NET or Python.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also