For those of you who tried Windows API Code Pack, particularly the TaskDialog managed wrapper, you’ve probably encountered the following error when trying to run your program.
Too bad,
I was happy when I heard they finally released a managed API for those (not yet managed) APIs …
I have been struggling a lot last year to try get it working with C#, thanks to Chris Dunford’s VistaBridge Considered Harmful; An Alternative which would have otherwise, never happened.
(Credits goes to Kenny Kerr too, for his article and Bart Desmet’s Using Windows Vista’s TaskDialog API in managed code)
The main problem is was the activation context,
Solution is here :
Here is the translation in english :
- Open your project properties in the Solution Explorer,
- On the Security tab, check Enable ClickOnce Security Settings,
- Now you can see appearing the app.manifest file in the Properties folder of your solution, open it,
- Beneath the </trustInfo> tag, insert the following code :
<dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency> - If you try to build there’ll be an error, to fix it, uncheck the Enable ClickOnce Security Settings.
2 Comments
Thanks for a wonderful post, l ve been looking for such information, I will join jour rss feed now.
Sorry for the long delay !
One Trackback
[...] To get the whole story, see my post Unable to find an entry point name ‘TaskDialogIndirect’ in DLL ‘comctl32.dll’… [...]