PREV TOC HOME INDEX NEXT


NCM_GetDlgSrvStateEx( )


Description | Cautions | Example | Error Codes | See Also

Name:

NCMRetCode NCM_GetDlgSrvStateEx( pncmSrvState )

Inputs:

SERVICE_STATUS *srvcStatus
  • pointer to Win32 SERVICE_STATUS structure

Returns:

NCM_SUCCESS if success NCM error code if failure

Includes:

NCMApi.h

Mode:

synchronous

Description

The NCM_GetDlgSrvStateEx( ) function gets the Intel® Dialogic System Service state. For more information about the Intel® Dialogic System Service, see Section 2.8, Starting and Stopping the Intel® Dialogic System Service.

This function returns the state of the Intel® Dialogic System Service by filling the passed pointer.

This is the new version of the NCM_GetDlgSrvState( ) function. It replaces the input parameter by the standard SERVICE_STATUS structure.

The function parameters are defined as follows:

Parameter

Description

pncmSrvState points to the current state of the Intel® Dialogic System Service. Refer to the Windows documentation for possible states of a service.

Cautions

None

Example

#include "NCMApi.h" 
...
//
// Execute
// 
SERVICE_STATUS srvcStatus; 
NCMRetCode ncmRc = NCM_GetDlgSrvStateEx( &srvcStatus ); 
if ( ncmRc == NCM_SUCCESS )
{
     if ( srvcStatus.dwCurrentState == SERVICE_CONTINUE_PENDING )
     {
          printf( "Continue Pending\n" );
     }
     else if ( srvcStatus.dwCurrentState == SERVICE_PAUSE_PENDING )
     {
          printf( "Pause Pending\n" );
     }
     else if ( srvcStatus.dwCurrentState == SERVICE_STOP_PENDING )
     {
          printf( "Stop Pending\n" );
     }
     else if ( srvcStatus.dwCurrentState == SERVICE_START_PENDING )
     {
          printf( "Start Pending\n" );
     }
     else if ( srvc.dwCurrentState == SERVICE_RUNNING )
     {
          printf( "Running\n" );
     }
     else if ( srvcStatus.dwCurrentState == SERVICE_STOPPED )
     {
          printf( "Stopped\n" );
     }
     else if ( srvcStatus.dwCurrentState == SERVICE_PAUSED )
     {
          printf( "Paused\n" );
     }
     else
     {
          printf( "Unknown\n" );
     }
}
else
{     // process error
     ...
}
... 

Error Codes

Equate

Returned When

NCME_OPENING_SCM an error occurred opening service control manager
NCME_OPENING_DLGC_SVC an error occurred opening the Intel® Dialogic System Service
NCME_QUERY_SVC_STATUS an error occurred querying the status of the Intel® Dialogic System Service
NCME_INVALID_INPUTS the values of the parameters supplied are invalid

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