Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / January 2005

Tip: Looking for answers? Try searching our database.

interop question - shell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Craig - 07 Jan 2005 00:47 GMT
Is it alright to add a reference to shell32.dll and then use the objects in
that namespace, like: Shell32.FolderItem ?   (and then distribute the app to
various windows operating systems)

The reason I ask, I created an app that does this, and when I transfer the
code to a project with stricter compile options, it errors and says the
shell32.dll doesn't have a strong name.   Should I rewrite all the code to
use pinvoke interop instead of the namespace?   And...if so, can you do
everything through interop that you could through the namespace (like
Shell32.FolderItem)??

Any and all suggestions are welcome.   This has set me back considerably.
Mattias Sj?gren - 08 Jan 2005 02:19 GMT
>Is it alright to add a reference to shell32.dll and then use the objects in
>that namespace, like: Shell32.FolderItem ?   (and then distribute the app to
>various windows operating systems)

Sure. Just make sure those COM objects are available on the Windows
version you target.

>The reason I ask, I created an app that does this, and when I transfer the
>code to a project with stricter compile options, it errors and says the
>shell32.dll doesn't have a strong name.

http://www.dotnetinterop.com/faq/?q=StrongNameIA

>Should I rewrite all the code to
>use pinvoke interop instead of the namespace?   And...if so, can you do
>everything through interop that you could through the namespace (like
>Shell32.FolderItem)??

Probably, but it may take more work. You'll have to decide which way
you want to go depending on what you're trying to accomplish.

Mattias

Signature

Mattias Sjögren [MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.