NCM_GetDialogicDir( )
Description | Cautions | Example | Error Codes
NCMRetCode NCM_GetDialogicDir (szKey, size, pDlgcDir)
char *szKey int *size char *pDlgcDir NCM_SUCCESS if success NCM error code if failure NCMApi.h synchronous Description
The NCM_GetDialogicDir( ) function returns the corresponding Dialogic directory. The function queries the Dialogic path for the specified path key. For example if the key value is "DLFWLPATH", then "...\Dialogic\data" would be returned
The function parameters are defined as follows:
Cautions
The application needs to allocate memory for the Dialogic directory to be returned and needs to provide the size of the buffer allocated. If the size is too small, the function will return NCME_BUFFER_TOO_SMALL.
Example
#include "NCMApi.h" ... NCMRetCode ncmRc = NCM_SUCCESS; // get Dialogic data directory char * pDlg_data_path = NULL; int bufferSize = MAX_PATH; char pathKey [MAX_PATH] = {0}; strcpy( pathKey, "DLFWLPATH" ); // // Execute // do { pDlg_data_path = (char*)realloc(pDlg_data_path, bufferSize * sizeof( char ) ); memset (pDlg_data_path, '/0', bufferSize ); ncmRc = NCM_GetDialogicDir( pathKey, &buffersize, pDlg_data_path); bufferSize *=2; } while (ncmRc ==NCME_BUFFER_TOO_SMALL ); if (ncmRC != NCM_SUCCESS && ncmRc !=NCME_BUFFER_TOO_SMALL) { // Process error ... } else if ( pDlg_data_path != NULL) { printf( "dialogic dir path is %s\n", pDlg_data_path ); } // clean up if ( PDlg_data_path ) free( pDlg_data_path ); ...Error Codes
NCME_BUFFER_TOO_SMALL buffer is too small NCME_DATA_NOT_FOUND requested data not found in NCM data storage NCME_INVALID_INPUTS the values of the parameters supplied are invalid
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation