QueryServiceDynamicInformation function

Retrieves dynamic information related to the current service start.

Syntax

BOOL QueryServiceDynamicInformation(
  SERVICE_STATUS_HANDLE hServiceStatus,
  DWORD                 dwInfoLevel,
  PVOID                 *ppDynamicInfo
);

Parameters

hServiceStatus

A service status handle provided by RegisterServiceCtrlHandlerEx

dwInfoLevel

Indicates the information level.

Value Meaning
SERVICE_DYNAMIC_INFORMATION_LEVEL_START_REASON
Indicates a request for dynamic information related to the current service start.

ppDynamicInfo

A dynamic information buffer. If this parameter is valid, the callback function must free the buffer after use with the LocalFree function.

Return Value

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE. When this happens the GetLastError function should be called to retrieve the error code.

Requirements

   
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header winsvc.h (include Windows.h)
Library Advapi32.lib
DLL Advapi32.dll

See Also

ChangeServiceConfig

ChangeServiceConfig2

CreateService

OpenService

QueryServiceConfig

QueryServiceConfig2

QueryServiceObjectSecurity

Service Configuration

Service Functions