PDL_GetAppinfoValue

Description

Given a name, this call gets its corresponding value from the appinfo.json file. Besides name/value pairs required for configuration, you are allowed to store your own name/value pairs in this file. See Configuring Your Application's appinfo.json File for more information.

The value of name is passed back in the buffer variable. You should be aware of the requested value's size and set buffer and bufferLen accordingly. If buffer is not big enough to hold the value, then the value is truncated.

Syntax

PDL_Err PDL_GetAppinfoValue(const char *name, char *buffer, int bufferLen);               

Argument Description
name Name of the argument to extract.
buffer Pointer to the buffer.
bufferLen Length of the buffer.

Returns

PDL_INVALIDINPUT — buffer is NULL or its length is zero or name is NULL.
PDL_APPINFO — Could not access appinfo file.
PDL_NOERROR — Success.                    

Note:

For the PDL_GetAppinfoValue call, your application must be in the same directory as the appinfo.json file or in a sub-directory of where it resides—the call will scan up through the directory structure looking for it.