Click to See Complete Forum and Search --> : Shell Interfaces (Like IProgressDialog); TlbImp?


wfunction
March 21st, 2007, 01:34 PM
Please Help!!
I tried tlbimp.exe for shell32.dll, but barely any interfaces were imported. What am I doing wrong?

Thank you!!

TheCPUWizard
March 21st, 2007, 01:38 PM
*Most* things from shell32 are available (at least with the latest version) from within .Net. What specific functionallity are you trying to reach? there may be another approach.....

wfunction
March 21st, 2007, 06:56 PM
IProgressDialog... it was in this thread's title.

Shuja Ali
March 21st, 2007, 09:51 PM
IProcessDialog is typically used during deleting, uploading, copying, moving, or downloading files. And as far as I know .NET 2.0 provides the overloads for methods for Copying, Deleting or Moving files which allow you to show the UI to the users with the progress indicator. Take a look at the methods in My.Computer.FileSystem (http://msdn2.microsoft.com/en-us/library/0b485hf7.aspx) object.

Now the million dollar question would be, what exactly do you want to do with the IProcessDialog? (That is what is being asked in Post #2 also).

Edit--
And here some more food for thought.
http://www.codeproject.com/csharp/iprogressdialognet.asp

wfunction
March 21st, 2007, 10:29 PM
I already know that most of the stuff are in the .NET Framework (the new My namespace and the file operation functions), but I am assuming I am using it for some other, non-typical, purpose, since I may want, for example, for the progress bar to represent some other operation.
Although many functionalities are provided, if one isn't, how do I import all the interfaces? I am only using IProgressDialog as an example.

Thanks!

P.S.: I'm not a typical person!!

Shuja Ali
March 21st, 2007, 10:37 PM
The link provided in post #4 shows how to build a wrapper around the IProcessDialog interface and use it in your application. In most of the cases if there is functionality that you want to use and if that functionality is not provided in the language, you will use the underlying Operating API's to achieve what you intend to do.

A best way is to build a wrapper on top of the APIs/Interfaces that are exposed by the operating system.

wfunction
March 22nd, 2007, 10:49 AM
Thanks a lot for the link, although I had already seen it before (but how would you know?).
The problem is, I am using IProgressDialog as an example. If I want to import all the interfaces, does that mean that I have to write a wrapper for all of them? That's scary! Also, this needs no APIs, just the COM interfaces.

Thanks!

Shuja Ali
March 22nd, 2007, 11:56 AM
I understand what you are saying. I wrote API just for reference. Not all COM Interfaces need a wrapper but some of them definitely do.

wfunction
March 22nd, 2007, 07:16 PM
I understand what you are saying. I wrote API just for reference. Not all COM Interfaces need a wrapper but some of them definitely do.
Well, thanks a lot for understanding the question.
So what's the answer?! How do I import all the APIs without writing 100 wrappers?
Thanks.

Shuja Ali
March 23rd, 2007, 01:05 AM
To answer your question, most of them are already available with .NET 2.0 so you don't need to create a wrapper for it. And for the ones which are not added (which are very few) you will have to use the API reference and then build a wrapper on top of it. Take a look at the Code that is provided and you should be able to understand how it is done.

wfunction
March 23rd, 2007, 11:40 AM
Thanks..
So I guess I'll have to write a wrapper for all of them.

But my first question is still there: why does TlbImp.exe not import the interfaces (like IProgressBar) from Shell32.dll?