AnsweredAssumed Answered

how to use a 64 bit time when calling spPIPoint->Data->UpdateValue

Question asked by jpj@tpri.com on Oct 27, 2020
Latest reply on Oct 28, 2020 by gregor

The following call from a Windows C++ application:

      hr = spPIPoint->Data->UpdateValue(pPiVal->value, pPiVal->time.PiTimeVal.iTime, dmInsertDuplicates, NULL);

works successfully when passing a 32-bit time (seconds since 1900)

 

However, when calling the same function with a 64 bit time (100 ns intervals since 1600) in the same C++ windows application to provide better time resolution:

      CY cyTime;

             cyTime.int64 = pPiVal->time.PiTimeVal.tTime;

             hr = spPIPoint->Data->UpdateValue(pPiVal->value, cyTime, dmInsertDuplicates, NULL);

returns failed with error 0x80040523

What is the proper way to call this UpdateValue function with a 64 bit time?

Outcomes