views:

27

answers:

1

Hi forum. I asked a question earlier asking how to use the Windows 7 taskbar progress bar without the .dll files, but I realized that in VS2010 you can embed a .dll into your application. I set this option to embed to true, but when trying to use the code for said .dll, I get this error:

Interop type "Windows7ProgressBar" cannot be embedded. Use the application interface instead.

Not quite understanding what I have to do, I finally found a single .dll which is only 20KB (instead of the three required for the Windows API) and I can't quite use it yet.
Any help is appreciated!

A: 

The VS2010 option named "Embed Interop Type" only works for COM interop libraries. Not sure what "Windows7ProgressBar" might mean but it certainly doesn't sound much like an interop type. The native COM interface name is ITaskbarList4. Perhaps you are trying to embed a class wrapper for this interface, that won't work.

Consider using the ILMerge tool to combine assemblies.

Hans Passant
I will give this a try!just trying to make my app the least complex as possible.Now in the references list would I say True to copy local or False since I will be embedding it in the application?
Yiu Korochko
You *have* to use True. Yes, keep it simple. Just copy the DLL.
Hans Passant
So when the application starts with the .dll embedded via ILMerge it should recognize that the dll is embedded but treat it as a separate file?Thank you for your solution!
Yiu Korochko