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) |
|
04/25/2018 |
reference |
windows 10, uwp, standard, c++, cpp, winrt, projection, api, reference, delegate, handler |
|
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.
struct event_token
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)
Function | Description |
---|---|
event_token::value data member | An opaque numeric value uniquely representing the registration of a delegate with an event. |
Operator | Description |
---|---|
event_token::operator bool | Checks whether or not the event_token object is valid and initialized. |
Operator | Description |
---|---|
operator== (equality operator) | Returns a value indicating whether the two parameters are equal to one another. |
Checks whether or not the event_token object is valid and initialized.
explicit operator bool() const noexcept;
true
if the event_token object is valid and initialized (the value of its value
field is not zero), otherwise false
.
An opaque numeric value uniquely representing the registration of a delegate with an event.
int64_t value{};
Returns a value indicating whether the two parameters are equal to one another.
inline bool operator==(winrt::event_token const& left, winrt::event_token const& right) noexcept;
left
right
An event_token value to compare with the other parameter.
true
if the two parameters are equal to one another, otherwise false
.