PREV TOC HOME INDEX NEXT


NCM_GetDialogicDir( )


Description | Cautions | Example | Error Codes

Name:

NCMRetCode NCM_GetDialogicDir (szKey, size, pDlgcDir)

Inputs:

char *szKey
  • the Dialogic path key
int *size
  • address of buffer size
char *pDlgcDir
  • pointer to the Dialogic directory to be returned

Returns:

NCM_SUCCESS if success NCM error code if failure

Includes:

NCMApi.h

Mode:

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:

Parameter

Description

szKey ASCII Z string containing specific dialogic path key value. The possible key values with their corresponding path are defined as follows:
  • DIALOGICDIR: "...\Dialogic\"
  • DLCFGPATH: "...\Dialogic\cfg"
  • DLFWLPATH: "...\Dialogic\data"
  • DLINFPATH: "...\Dialogic\inf"
  • DLLOGPATH: "...\WINNT\System32"
  • DNASDKDIR: "...\Dialogic\bin"
  • MRFDir: "\Dialogic\mrf"
size the buffer size for pDlgcDir to be returned
pDlgDir pointer to the Dialogic directory to be returned

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

Equate

Returned When

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


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

Copyright 2003, Intel Corporation
All rights reserved
This page generated January, 2003