Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
You can unbox not only scalar values, but also most kinds of arrays (with the exception of arrays of enumerations) by using the winrt::unbox_value function.
A function template that unwraps (or unboxes) a scalar or array value from inside a reference class object so that it can be processed in a function that expects IInspectable. For more details, and code examples, see Boxing and unboxing values to IInspectable with C++/WinRT.
Syntax
template <typename T>
T unbox_value(winrt::Windows::Foundation::IInspectable const& value);
Template parameters
typename T
A scalar or array type.
Parameters
value
A reference class object containing a boxed value.
Return value
The scalar or array value contained inside the reference class object.
Requirements
Minimum supported SDK: Windows SDK version 10.0.17134.0 (Windows 10, version 1803)
Namespace: winrt
Header: %WindowsSdkDir%Include<WindowsTargetPlatformVersion>\cppwinrt\winrt\Windows.Foundation.h