How to Get ICoreWindowInterop from CoreWindow
问题 I have a C++/WinRT/UWP project. I need the HWND and HINSTANCE to be able to correctly initialize Direct Input, otherwise DirectInput manage only to enumerate the keyboard and mouse but not the joysticks.. don't ask me why, I even tried to get the TopMostWindow from the HInstance got with GetModule, it just return NULL when running from my C++/WinRT/UWP app, but works when running from a console app. documentation https://docs.microsoft.com/en-us/windows/win32/api/corewindow/nn-corewindow