bool CDatum::CreateStringFromHandoff (CStringBuffer &String, CDatum *retDatum) // CreateStringFromHandoff // // Creates a string by taking a handoff from a string buffer { // Take ownership of the data LPSTR pString = String.Handoff(); // Track it with our allocator (but only if not NULL). // (If pString is NULL then this is represented as Nil). if (pString) g_StringAlloc.New(pString); // Store the pointer retDatum->m_dwData = (DWORD_PTR)pString; // Done return true; }
void CComplexBinary::TakeHandoff (CStringBuffer &Buffer) // TakeHandoff // // Takes ownership { if (m_pData) delete [] GetBuffer(); m_pData = Buffer.Handoff(); }