IMetroMode::IsLauncherVisible in C# via pInvoke?

后端 未结 2 738
礼貌的吻别
礼貌的吻别 2020-12-21 14:03

In C# in Windows 8, how can I pInvoke the IMetroMode::IsLauncherVisible method?

Details for the method are found here: http://msdn.microsoft.com/en-us/library/window

2条回答
  •  自闭症患者
    2020-12-21 14:31

    Couple of things:

    1. Looks like IMetroMode was removed from the RC and RTM builds of Windows 8.
    2. You don't use P/Invoke on WinRT calls, instead you should add a reference in your C# project to the appropriate WinMD file from C:\Program Files (x86)\Windows Kits\8.0\References\CommonConfiguration\Neutral\. This will provide interop services complete with auto-completion that should provide access to whatever WinRT facilities you require. You can find more info here.

提交回复
热议问题