ReleaseBuffer
After call SetInternalDataType and use internal data buffer modify the obeject, must call this method to update the object.
void ReleaseBuffer( )
EX1
void DataObject_ReleaseBuffer_Ex1() { Worksheet wks = Project.ActiveLayer(); if(wks) { Column col(wks, 0); // first column if( col ) { int nElementSize; uint nNum; LPVOID pData = col.GetInternalDataBuffer(&nElementSize, &nNum); if(NULL == pData) out_str("return NULL if col is Text type or mixed type"); else { if(0 != nNum) { double *pTemp = (double*)pData; // cast to double since cannot direclty access the value of void type pointer point to *pTemp = 0.5; // change the value of first item col.ReleaseBuffer(); // after call this, first row of first column will change to 0.5 } } } } }
DataObject::GetInternalDataBuffer
origin.h