MCPcopy Create free account
hub / github.com/derceg/explorerplusplus / ConvertDateVariantToString

Function ConvertDateVariantToString

Explorer++/Helper/ShellHelper.cpp:725–753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

723}
724
725HRESULT ConvertDateVariantToString(DATE date, TCHAR *szDetail, size_t cchMax, BOOL friendlyDate)
726{
727 SYSTEMTIME systemTime;
728 int variantConverted = VariantTimeToSystemTime(date, &systemTime);
729
730 if (!variantConverted)
731 {
732 return E_FAIL;
733 }
734
735 SYSTEMTIME localSystemTime;
736 BOOL systemTimeConverted =
737 SystemTimeToTzSpecificLocalTime(nullptr, &systemTime, &localSystemTime);
738
739 if (!systemTimeConverted)
740 {
741 return E_FAIL;
742 }
743
744 BOOL dateStringCreated =
745 CreateSystemTimeString(&localSystemTime, szDetail, cchMax, friendlyDate);
746
747 if (!dateStringCreated)
748 {
749 return E_FAIL;
750 }
751
752 return S_OK;
753}
754
755HRESULT ConvertVariantStringArrayToString(SAFEARRAY *array, TCHAR *szDetail, size_t cchMax)
756{

Callers 1

ConvertVariantToStringFunction · 0.85

Calls 1

CreateSystemTimeStringFunction · 0.85

Tested by

no test coverage detected