OPC Studio User's Guide and Reference
GetLifetimeInMonthsFrom Method (_CertificateGenerationParameters)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Security.ComTypes Namespace > _CertificateGenerationParameters Interface : GetLifetimeInMonthsFrom Method
The date from which to calculate the maximum lifetime.
Calculates the maximum lifetime of the generated certificate from the given date, in months.
Syntax
'Declaration
 
Function GetLifetimeInMonthsFrom( _
   ByVal fromDateTime As Date _
) As Integer
'Usage
 
Dim instance As _CertificateGenerationParameters
Dim fromDateTime As Date
Dim value As Integer
 
value = instance.GetLifetimeInMonthsFrom(fromDateTime)
int GetLifetimeInMonthsFrom( 
   DateTime fromDateTime
)
int GetLifetimeInMonthsFrom( 
   DateTime fromDateTime
) 

Parameters

fromDateTime
The date from which to calculate the maximum lifetime.

Return Value

Number of months representing the lifetime of the certificate.
Remarks

The return value is the lower of number of months dictated by the MaximumExpirationDate and ValidityPeriodInMonths.

This method or property does not throw any exceptions, aside from execution exceptions such as System.Threading.ThreadAbortException or System.OutOfMemoryException.

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