// ToUnsigned static bool ToUnsigned( const COpcString& cString, ULong& nValue, ULong nMax, ULong nMin ) { // extract base COpcText cText; COpcTextReader cReader(cString); UINT uBase = 10; cText.SetType(COpcText::Literal); cText.SetText(L"0x"); cText.SetIgnoreCase(); if (cReader.GetNext(cText)) { uBase = 16; } // read unsigned value. return ToUnsigned(cReader.GetBuf(), nValue, nMax, nMin, uBase); }