I have a application set up like a three layer cake: where the upper and lower layers support WinRT but the middle does not. Those upper and lower WinRT layers need to share a reference to the application’s CoreWindow object but their only communication channel is through the middle layer. I can only pass it through the middle non-WinRT layer. How do I pass the CoreWindow object through the middle non-WinRT layer?
Casting from CoreWindow^ to void* doesn’t give me any complaints from the compiler, but casting back to CoreWindow^ gives me type conversion errors.
Of course I figure it out only after posting: I used reinterpret_cast< CoreWindow^ >(windowPtr).