Skip to content

Latest commit

 

History

History
80 lines (60 loc) · 2.72 KB

File metadata and controls

80 lines (60 loc) · 2.72 KB
description title dev_langs ms.date ms.topic keywords ms.workload
A token returned when registering an event-handling delegate with an event; can be used to revoke the registration of the same delegate.
winrt::event_token struct (C++/WinRT)
C++
04/25/2018
language-reference
windows 10, uwp, standard, c++, cpp, winrt, projection, api, reference, delegate, handler
cplusplus

winrt::event_token struct (C++/WinRT)

A token returned when registering an event-handling delegate with an event; can be used to revoke the registration of the same delegate. For more info about handling events, and code examples, see Handle events by using delegates in C++/WinRT.

Syntax

struct event_token

Requirements

Minimum supported SDK: Windows SDK version 10.0.17134.0 (Windows 10, version 1803)

Namespace: winrt

Header: %WindowsSdkDir%Include<WindowsTargetPlatformVersion>\cppwinrt\winrt\base.h (included by default)

Data members

Function Description
event_token::value data member An opaque numeric value uniquely representing the registration of a delegate with an event.

Member operators

Operator Description
event_token::operator bool Checks whether or not the event_token object is valid and initialized.

Free operators

Operator Description
operator== (equality operator) Returns a value indicating whether the two parameters are equal to one another.

event_token::operator bool

Checks whether or not the event_token object is valid and initialized.

Syntax

explicit operator bool() const noexcept;

Return value

true if the event_token object is valid and initialized (the value of its value field is not zero), otherwise false.

event_token::value data member

An opaque numeric value uniquely representing the registration of a delegate with an event.

Syntax

int64_t value{};

operator== (equality operator)

Returns a value indicating whether the two parameters are equal to one another.

Syntax

inline bool operator==(winrt::event_token const& left, winrt::event_token const& right) noexcept;

Parameters

left right An event_token value to compare with the other parameter.

Return value

true if the two parameters are equal to one another, otherwise false.

See also