Search code examples
delphidelphi-xe6taskbar

How to resolve "ITaskbarList3 interface is not supported on this OS version" on XE6


Delphi XE6 raises

ITaskbarList3 interface is not supported on this OS version

error at runtime on Vista and XP. It is a known issue in Quality Central and resolved in XE7.

The error comes when the TTaskbar VCL component is placed on a TForm and the application is run on OS prior to Windows 7 (such as Vista or XP).

How one can work around this in XE6?


Solution

  • This interface was introduced in Windows 7. It is not implemented by earlier versions. The requirements section of the documentation makes this clear. This is of course eminently reasonable since the interface encapsulates functionality that does not exist in Vista and earlier.

    On a platform lower than Windows 7 you should not attempt to use this interface. My guess, although you do not state it, is that you are using a VCL wrapper around this interface, rather than the interface itself. All the same, the solution is the same. Avoid the component, or at least the code path, that uses the interface in question.

    So, if you encounter the problem because you used TTaskbar, make sure that you don't use TTaskbar when the program runs on a system that does not support ITaskbarList3. Likely this means no longer creating the component using the form designer and instead doing so, conditionally, using runtime code.