OPC Studio User's Guide and Reference
AssureSecurityInitialization(String) Method



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Runtime.InteropServices Namespace > ComManagement Class > AssureSecurityInitialization Method : AssureSecurityInitialization(String) Method
The name of entity that requests the initialization (used for logging).

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

Assures that COM security is initialized.
Syntax
'Declaration
 
<NotNullAttribute()>
Public Overloads Function AssureSecurityInitialization( _
   ByVal requestorName As String _
) As ValueResult(Of Boolean)
'Usage
 
Dim instance As ComManagement
Dim requestorName As String
Dim value As ValueResult(Of Boolean)
 
value = instance.AssureSecurityInitialization(requestorName)
[NotNull()]
public ValueResult<bool> AssureSecurityInitialization( 
   string requestorName
)
[NotNull()]
public:
ValueResult<bool>^ AssureSecurityInitialization( 
   String^ requestorName
) 

Parameters

requestorName
The name of entity that requests the initialization (used for logging).

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

Return Value

Returns a OpcLabs.BaseLib.OperationModel.Generic.ValueResult<T>, indicating success or failure of the operation. In case of success, the value is true if the operation has initialized the COM security; the value is false if COM security has been initialized earlier, with the same parameters.

This method never returns null (Nothing in Visual Basic).

Exceptions
ExceptionDescription

A null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.

This is a usage error, i.e. it will never occur (the exception will not be thrown) in a correctly written program. Your code should not catch this exception.

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