I have a WPF application that sometimes launches legacy VB6 windows. These VB6 windows are compiled as ActiveX DLLs and are launched ‘modally’ from the main WPF application. When the main WPF application launches the VB6 window, the VB6 window passes Me.Hwnd back to the main WPF application which uses ITaskbarList to display an icon on the Windows Taskbar. Code similar to below has worked for years (“value” is ultimately Me.Hwnd from the VB6 application).
private ITaskbarList _taskbar;
_taskbar = (ITaskbarList)new CoTaskbarList();
_taskbar.HrInit();
_taskbar.AddTab((IntPtr)value);
My client is now running the application via RemoteApp and the HrInit method is throwing an exception (HResult -2146233088 / 0x80131500).
Is ITaskbarList functionality supported under RemoteApp? Is there a better approach to accessing the taskbar when the application is running under RemoteApp?