WscRegisterForChanges function (wscapi.h)

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(
  [in]  LPVOID                 Reserved,
  [out] PHANDLE                phCallbackRegistration,
  [in]  LPTHREAD_START_ROUTINE lpCallbackAddress,
  [in]  PVOID                  pContext
);

Parameters

[in] Reserved

Reserved. Must be NULL.

[out] 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.

[in] 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.

[in] 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

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header wscapi.h
Library Wscapi.lib
DLL Wscapi.dll

See also

WscUnRegisterChanges