OPC Studio User's Guide and Reference
RegisterFileWithExistenceCheck Method



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.ComponentModel Namespace > LicensingManagement Class : RegisterFileWithExistenceCheck Method
Name of the licensing component for which the location of the license should be registered. Consult the documentation for the value that corresponds to your product.
ID of the license for whose location should be registered. Consult the documentation for the values to be used with your product.
The name of the file containing the license.
Registers a license located in a file, checking whether the file exists.
Syntax
'Declaration
 
Public Sub RegisterFileWithExistenceCheck( _
   ByVal componentName As String, _
   ByVal licenseId As String, _
   ByVal filePath As String _
) 
'Usage
 
Dim instance As LicensingManagement
Dim componentName As String
Dim licenseId As String
Dim filePath As String
 
instance.RegisterFileWithExistenceCheck(componentName, licenseId, filePath)
public void RegisterFileWithExistenceCheck( 
   string componentName,
   string licenseId,
   string filePath
)
public:
void RegisterFileWithExistenceCheck( 
   String^ componentName,
   String^ licenseId,
   String^ filePath
) 

Parameters

componentName
Name of the licensing component for which the location of the license should be registered. Consult the documentation for the value that corresponds to your product.
licenseId
ID of the license for whose location should be registered. Consult the documentation for the values to be used with your product.
filePath
The name of the file containing the license.
Exceptions
ExceptionDescription
A license file is already registered for componentName and licenseId.
The specified license file does not exist or is not accessible.

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.

An invalid Uniform Resource Identifier (URI) was detected.
Remarks

The same combination of componentName and licenseId must not (and cannot) be registered more than once. An attempt to do so will result in an System.ArgumentException. Be careful not to put the registration code into Web request handlers (without further logic) which are called repeatedly.

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