What should I include within a C# application in order to make Shell32 work?
Edit:
My application can't recognize shell32. What references or lib should I include? What I'm trying to do is:
Shell32.Shell shell = new Shell32.Shell();
What I'm getting as an error:
Error 1 The type or namespace name 'Shell32' could not be found (are you missing a using directive or an assembly reference?)
maybe this can help:
Add reference
.COM
tab inAdd reference
dialogueMicrosoft Shell Controls and Automation
your
shell32
is ready to use...Just
Add Reference
toShell32.dll
form theWindows/system32
folder and use it:The class shown below should help with some of the methods of shell32 in C# . you should add the reference of "Microsoft Shell command and automation" with the reference window by righting clicking the project .
I know this thread is old, but I post this for anyone having the same problem as I did. The solution above does not compile under windows 8
Shell32.Shell shell = new Shell32.Shell(); <= this doesn't work with windows 8
Use the work around below if you want your apps to run under windows 8.
You now have the appropriate reference for using Shell32.Shell.
I'm guessing that you're having trouble getting any calls recognized, so I'd refer you to this general article: http://www.codeproject.com/KB/shell/csdoesshell1.aspx
Beyond that, you'll need to provide specifics of what isn't working for you.