// Write template<> bool OpcXml::Write(const DateTime& cValue, COpcString& cString) { // check for invalid date. if (cValue == OpcMinDate()) { cString.Empty(); return true; } // convert to xml dateTime representation. SYSTEMTIME cSystemTime; if (!FileTimeToSystemTime(&((FILETIME)cValue), &cSystemTime)) { return false; } WCHAR szBuf[MAX_VALUE_BUF_SIZE]; swprintf( szBuf, L"%04hu-%02hu-%02huT%02hu:%02hu:%02hu.%03hu", cSystemTime.wYear, cSystemTime.wMonth, cSystemTime.wDay, cSystemTime.wHour, cSystemTime.wMinute, cSystemTime.wSecond, cSystemTime.wMilliseconds); cString = szBuf; return true; }
// Clear template<> void OpcXml::Clear(COpcString& cValue) { cValue.Empty(); }
// Init template<> void OpcXml::Init(COpcString& cValue) { cValue.Empty(); }