Thanks Jesse for your answer. Thats not what I was asking though. I know how to use DispatchedHandler with the CoreDispatcher.
I was interested in the internals of how it calls the DispatchedHandler::Invoke method because the crazy IntelliSense underlined my code when I wanted to call Invoke myself complaining that the call is protected. I needed that because in background tasks
I do not have a CoreDispatcher available. However, the compiler did not complain (makes you wonder why IntelliSense uses a different set of rules than the compiler) but the app terminated when I called Invoke().
Doesn't matter now anymore though, since I found out that just calling callbacks without DispatchedHandler works very well in background task scenarios.