Pls help to store values in a safearray nd retrive it back again...
-
Hi Can any one help me in storing integer values(3-4 values) which i get from a grid control in a Safearray....nd i need to use them again after storing.... This is the code which i wrote is this OK.. SAFEARRAY *intPixels; SAFEARRAYBOUND rgsabound[1]; rgsabound[0].lLbound = 0; rgsabound[0].cElements = 3; intPixels = SafeArrayCreate(VT_I4,1,rgsabound); int tempint_j = 0,tempint_p = 0; for(int i = 0;i < 3;i = i+1) { CString tempStr; //Getting Values from Grid tempStr = m_Grid.GetTextArray(i); //convert values from String to int //as they are from grid int tempint_a = atoi(tempStr); SafeArrayPutElement(intPixels,(long *)&tempint_j,(void *)&tempint_a); tempint_j= tempint_j + 1; } Will the above code stores the values obtained from the Grid control(m_Grid) in the Safe Array.... if this stores the integer values in SafeArray pls tell me how to get them back to Use them.....? Thanks
-
Hi Can any one help me in storing integer values(3-4 values) which i get from a grid control in a Safearray....nd i need to use them again after storing.... This is the code which i wrote is this OK.. SAFEARRAY *intPixels; SAFEARRAYBOUND rgsabound[1]; rgsabound[0].lLbound = 0; rgsabound[0].cElements = 3; intPixels = SafeArrayCreate(VT_I4,1,rgsabound); int tempint_j = 0,tempint_p = 0; for(int i = 0;i < 3;i = i+1) { CString tempStr; //Getting Values from Grid tempStr = m_Grid.GetTextArray(i); //convert values from String to int //as they are from grid int tempint_a = atoi(tempStr); SafeArrayPutElement(intPixels,(long *)&tempint_j,(void *)&tempint_a); tempint_j= tempint_j + 1; } Will the above code stores the values obtained from the Grid control(m_Grid) in the Safe Array.... if this stores the integer values in SafeArray pls tell me how to get them back to Use them.....? Thanks
Do you need to
SafeArrayGetElement
_**
**_
WhiteSky
-
Do you need to
SafeArrayGetElement
_**
**_
WhiteSky
-
I need to get the Values which i stored in the SafeArray Back.....by the by is the above code correct in storing the values in the safearray..