Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Talk:URI associations for Windows Phone

From Wiki
Jump to: navigation, search

How is this done in a native C++ app?

I have tried to implement this using:

->Activated += ref new TypedEventHandler<CoreApplicationView^, IActivatedEventArgs^>

The function is set up as:

void OnActivated(

       _In_ Windows::ApplicationModel::Core::CoreApplicationView^ applicationView,
       _In_ Windows::ApplicationModel::Activation::IActivatedEventArgs^ args

But the following code never seems to trigger:

if (args->Kind == Windows::ApplicationModel::Activation::ActivationKind::Protocol) { }

Also, the following code fails to compile:

Windows::ApplicationModel::Activation::ProtocolActivatedEventArgs^ eventArgs = dynamic_cast<Windows::ApplicationModel::Activation::ProtocolActivatedEventArgs^>(args);

With the message:

namespace "Windows::ApplicationModel::Activation" has no member "ProtocolActivatedEventArgs"