UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:certenroll.ICertPropertyBackedUp.InitializeFromCurrentTime |
ICertPropertyBackedUp::InitializeFromCurrentTime (certenroll.h) |
Initializes the property from a Boolean value and the current system date and time. |
|
security\icertpropertybackedup_initializefromcurrenttime_method.htm |
security |
2033c947-661c-4a52-b24f-82fa71ba7868 |
12/05/2018 |
ICertPropertyBackedUp interface [Security],InitializeFromCurrentTime method, ICertPropertyBackedUp.InitializeFromCurrentTime, ICertPropertyBackedUp::InitializeFromCurrentTime, InitializeFromCurrentTime, InitializeFromCurrentTime method [Security], InitializeFromCurrentTime method [Security],ICertPropertyBackedUp interface, certenroll/ICertPropertyBackedUp::InitializeFromCurrentTime, security.icertpropertybackedup_initializefromcurrenttime_method |
certenroll.h |
Windows |
Windows Vista [desktop apps only] |
Windows Server 2008 [desktop apps only] |
CertEnroll.dll |
Windows |
19H1 |
|
|
|
|
|
|
The InitializeFromCurrentTime method initializes the property from a Boolean value and the current system date and time.
A VARIANT_BOOL variable that identifies whether the certificate has been backed up.
If the function succeeds, the function returns S_OK.
If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values.
Return code/value | Description |
---|---|
|
The object is already initialized. |
|
The specified time is not valid. |
Internally, the InitializeFromCurrentTime calls the GetSystemTimeAsFileTime function in the Windows SDK. The date is stored as an 8-byte real value, representing a date between January 1, 1900 and December 31, 9999, inclusive. The value 2.0 represents January 1, 1900; 3.0 represents January 2, 1900. Adding 1 to the value increments the date by a day. The fractional part of the value represents the time of day. Therefore, 2.5 represents 12:00 on January 1, 1900; 3.25 represents 06:00 on January 2, 1900.
For dates between 1950 and 2049 inclusive, the date and time is encoded UTC-time in the form YYMMDDHHMMSS. For dates before 1950 or after 2049, encoded generalized time is used. Encoded generalized time is in the form YYYYMMDDHHMMSSMMM, using a four digit year, and is precise to milliseconds.
Call the SetValueOnCertificate method to associate the property with a certificate. To retrieve the date, call the BackedUpTime property. To retrieve the Boolean value that identifies whether a certificate was backed up, call the BackedUpValue property.