Optim Data Privacy Providers  11.7.0
 All Data Structures Files Functions Variables Macros Groups Pages
Example for Provider_GetInfo()

In the following example, the list of source column indices is retrieved.

RETVAL retVal; //return code
short sRequest; //Provider Information Request
short *psIndexBuf = NULL; //Source column index buffer pointer
int iIndexBufLen = 0; //Source column index buffer length
//Retrieve the size of the buffer to be allocated by the user for retrieving the source column indices. The buffer size is returned in iIndexBufLen.
retVal = Provider_GetInfo(iSvcToken, sRequest, NULL, &iIndexBufLen);
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;
}
retVal = Provider_GetInfo(iSvcToken, sRequest, psIndexBuf, &iIndexBufLen);
if(retVal != ODPPSUCCESS)
{
printf("Failed to get source column indices, retVal = %d \n",retVal);
free(psIndexBuf);
return retVal;
}
//Process the source column indices
free(psIndexBuf); //Free the allocated memory