PREV TOC HOME INDEX NEXT


NCM_GetErrorMsg( )


Description | Cautions | Example | Error Codes | See Also

Name:

NCMRetCode NCM_GetErrorMsg( ncmRcIn, ppncmErrorMsg)

Inputs:

NCMRetCode ncmRcIn
  • NCM return code
NCMErrorMsg **ppncmErrorMsg
  • address of pointer where error message will be output

Returns:

NCM_SUCCESS if success NCM error code if failure

Includes:

NCMApi.h

Mode:

synchronous

Description

The NCM_GetErrorMsg( ) function gets the error message for an error code. Every function in the DCM API returns a code indicating the success or failure of the function. This function accepts one of those codes and returns the appropriate text string for it.

Note: Refer to the System Log of the Windows Event Viewer for a detailed explanation of DCM API error messages.

The function parameters are defined as follows:

Parameter

Description

ncmRcIn the return code whose error message should be returned
ppncmErrorMsg a pointer to a pointer to be filled with the error message

Cautions

The DCM API allocates memory for the data returned by this function. To avoid memory leaks, the client application must deallocate this memory by calling the NCM_Dealloc( ) or NCM_DeallocValue( ) function.

Example

#include "NCMApi.h" 
... 
NCMFamily *     pFamilies = NULL; 
NCMRetCode     ncmRc = NCM_GetAllFamilies( &pFamilies ); 
if ( ncmRc == NCM_SUCCESS )
{
     ...
}
else
{     // Process error
     
     //
     // Execute
     // 
     NCMErrorMsg     *     pErrorMsg = NULL;
     
     ncmRc = NCM_GetErrorMsg( ncmRc, &pErrorMsg );
     if ( ncmRc == NCM_SUCCESS )
     {
          printf( "Failed to get families: %s\n", pErrorMsg->name );
     } 
     // Deallocate memory
     NCM_Dealloc( pErrorMsg );
} 
// Deallocate memory when through
// with it
NCM_Dealloc( pFamilies );
... 

n Error Codes

Equate

Returned When

NCME_INVALID_INPUTS the values of the parameters supplied are invalid
NCME_DATA_NOT_FOUND requested data not found in NCM data storage

See Also


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

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