We have a particular Vista x64 machine that, when running our C# WinForms app, displays the following error:
System.EntryPointNotFoundException: Unable to find an entry point named 'TaskDialogIndirect' in DLL 'ComCtl32'.
This same code works fine on other Vista machines. For some reason, this particular Vista machine always throws this exception.
How can we fix this?
I had problems with this and Naughter's free XTaskDialog API, to get a fallback mechanism on Windows XP machines via emulation, rendering this dialog implementation much more useful. :)
In my case it was an activation context issue, as mentioned in this blog entry.
Or, quoted here, in case the blog post is lost in cyberspace some day (applies to Visual Studio):
The code to insert in step 4:
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls"
version="6.0.0.0" processorArchitecture="*"
publicKeyToken="6595b64144ccf1df" language="*" />
</dependentAssembly>
</dependency>