I have the following share target that gets hit when receiving a share from IE. When I try to close the app it claims that the share has not completed, even though the function and the task have completed. What am I missing to finish the share?
void App::OnShareTargetActivated(ShareTargetActivatedEventArgs^ args)
{
auto share_op = args->ShareOperation;
if (share_op->Data->Contains(StandardDataFormats::Uri))
{
concurrency::create_task(share_op->Data->GetUriAsync()).then([](Uri^ uri){
auto absolute = uri->AbsoluteUri;
std::wstring str(absolute->Data(), absolute->Length());
});
}
else if (share_op->Data->Contains(StandardDataFormats::Html))
{
concurrency::create_task(share_op->Data->GetHtmlFormatAsync()).then([](String^ html){
std::wstring str(html->Data(), html->Length());
});
}
}