In the following example, the list of source column indices is retrieved.
short sRequest;
short *psIndexBuf = NULL;
int iIndexBufLen = 0;
if(retVal != ODPPSUCCESS)
{
printf("Failed to get buffer length, retVal = %d \n",retVal);
return retVal;
}
psIndexBuf = (short *)malloc(sizeof(short) * iIndexBufLen);
if(NULL == psIndexBuf)
{
printf("Failed to allocate memory for the source column indices");
return ODPPFAILURE;
}
if(retVal != ODPPSUCCESS)
{
printf("Failed to get source column indices, retVal = %d \n",retVal);
free(psIndexBuf);
return retVal;
}
free(psIndexBuf);