QueryServiceDynamicInformation function

Retrieves dynamic information related to the current service start.

Syntax


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

Parameters

hServiceStatus [in]

A service status handle provided by RegisterServiceCtrlHandlerEx

dwInfoLevel [in]

Indicates the information level.

ValueMeaning
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]

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

 

 

Community Additions

ADD
Show:
© 2014 Microsoft