using Ishellfolder in vb.net 2005

A

Andrius B.

Hi all.

Does anyone can suggest a good webpage or site, where I could read about how
to use IShellFolder interface in vb .net ?

E.g., I have added reference to IShellFolderEx_TLB.dll, but what next?
How to pass ITEMIDLIST structures
to IShellFolder components? E.g., I have parsed a name to Parent
IShellfolder in order to get an ITEMIDLIST of subfolder, I get its's
pointer as PIDL of type IntPtr, but the BidToObject method requires first
variable as Integer, and such things as converting ItrPtr.ToInt32 produces
error. I need smth else for passing, but what?
How to manipulate overall with such structures as ITEMIDLIST in vb .net (I
mean extracting pidls using CopyMemory functions and so on)??

All the examples or advices I found in Internet are only for C++ or
acceptable only in VB5-VB6, not for vb.net


Thanks in advance.
 
M

Mattias Sjögren

E.g., I have added reference to IShellFolderEx_TLB.dll, but what next?

That's a typelib made for VB6 isn't it? I wouldn't recommend using
that for a .NET application, it just complicates things. It's better
to declare the interfaces in managed code and take full advantage of
what the CLR marshaler can do for you.

but the BidToObject method requires first variable as Integer,

That's the kind of problems you avoid by not using the old typelib.

and such things as converting ItrPtr.ToInt32 produces error.

What error?

How to manipulate overall with such structures as ITEMIDLIST in vb .net (I
mean extracting pidls using CopyMemory functions and so on)??

Usually you don't have to directly manipulate ITEMIDLISTs, just pass
around PIDLs. If you have to do it there are APIs for it. But
Marshal.Copy may also be useful.


Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top