WscRegisterForChanges function

Registers a callback function to be run when Windows Security Center (WSC) detects a change that could affect the health of one of the security providers.

Syntax

HRESULT WscRegisterForChanges(
  LPVOID                 Reserved,
  PHANDLE                phCallbackRegistration,
  LPTHREAD_START_ROUTINE lpCallbackAddress,
  PVOID                  pContext
);

Parameters

Reserved

Reserved. Must be NULL.

phCallbackRegistration

A pointer to a handle to the callback registration. When you are finished using the callback function, unregister it by calling the WscUnRegisterChanges function.

lpCallbackAddress

A pointer to the application-defined function to be called when a change to the WSC service occurs. This function is also called when the WSC service is started or stopped.

pContext

A pointer to a variable to be passed as the lpParameter parameter to the function pointed to by the lpCallbackAddress parameter.

Return Value

Returns S_OK if the function succeeds, otherwise returns an error code.

Remarks

When you want to cease receiving notification to your callback method, you can unregister it by calling the WscUnRegisterChanges function.

Requirements

   
Windows version Windows Vista [desktop apps only] None supported
Target Platform Windows
Header wscapi.h
Library Wscapi.lib
DLL Wscapi.dll

See Also

WscUnRegisterChanges