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



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

Parameters

fromDateTime
The date from which to calculate the number of months.

Return Value

Number of months to the maximum expiration date.
Remarks

The return value depends on MaximumExpirationDate but not on DefaultValidityPeriodInMonths.

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