NCM_GetInstalledDevices( )
Description | Cautions | Example | Error Codes | See Also
NCMRetCode NCM_GetInstalledDevices (pncmFamily, ppncmDeviceUnique )
NCMFamily *pncmFamily NCMDevice **ppncmDeviceUnique NCM_SUCCESS if success NCM error code if failure NCMApi.h synchronous Description
The NCM_GetInstalledDevices( ) function gets all instantiated devices for a family.
The function parameters are defined as follows:
pncmFamily pointer to the structure containing the family name whose devices should be returned; the value contained in the structure must be an instantiated family (see Cautions below) ppncmDeviceUnique address of the pointer to the list to be filled with structures containing unique device names; the unique device names will be the same names you used to add the devices to the system configuration with the NCM_AddDevice( ) function Cautions
This function enables you to determine what devices are instantiated in the system configuration. To find out what devices are installable from the DCM Catalog, use the NCM_GetAllDevices( ) function. For more information about the distinction between the system configuration and the DCM Catalog, see Section 2.1, The DCM API Architecture.
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" ... // // Prepare inputs // NCMFamily family; family.name = "D/x1D"; family.next = NULL; NCMDevice * pDevices = NULL; // // Execute // NCMRetCode ncmRc = NCM_GetInstalledDevices( &family, &pDevices ); if ( ncmRc == NCM_SUCCESS ) { NCMDevice * pCurrDevices = pDevices; while ( pCurrDevices != NULL ) { // Process list ... pCurrDevices = pCurrDevices->next; } } else { // Process error ... } // Deallocate memory when through // with it NCM_Dealloc( pDevices ); ...Error Codes
NCME_INVALID_INPUTS the values of the parameters supplied are invalid NCME_INVALID_FAMILY the family name is invalid See Also
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation