SLRegisterEvent function (slpublic.h)

Registers an event in the SL service. The caller can receive notifications when the registered event is fired.

Syntax

HRESULT SLRegisterEvent(
  [in, optional] HSLC       hSLC,
  [in]           PCWSTR     pwszEventId,
  [in]           const SLID *pApplicationId,
  [in]           HANDLE     hEvent
);

Parameters

[in, optional] hSLC

Type: HSLC

The handle to the current SLC session.

[in] pwszEventId

Type: PCWSTR

The predefined SL event identifier.

[in] pApplicationId

Type: const SLID*

A pointer to the application ID to which the event will be registered.

[in] hEvent

Type: HANDLE

The event handle used for notification.

Return value

Type: HRESULT WINAPI

If this function succeeds, it return S_OK. Otherwise, it returns an HRESULT error code.

Return code/value Description
SL_E_INVALID_EVENT_ID
0xC004F019
The requested event ID is not valid.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header slpublic.h
Library Slc.lib
DLL Slc.dll