SHCreateItemFromIDList
(1)
SHGetPathFromIDList
(1)
IShellExtInit.Initialize
(1)
Windows 7
(1)
TeamB
(1)
PidlFolder
(1)
Hero
(1)
Directory
(1)

What holds pidlFolder on W7 Libraries?

Asked By Agent Sylar - First Class Hero
08-Nov-09 11:34 PM
Hello!

I have copy tool that uses shell extension, to paste files in folder from
where shell extension is invoked

It is working ok except on windows 7 libraries folders.

I use pidlFolder parameter of  IShellExtInit.Initialize function to get
folder's path by passing pidlFolder to SHGetPathFromIDList function, that
falls on value passed to pidlFolder on library folders.

My shell extension is registered for directory/background and
libraries/background

My problem is that I have no idea that is passed to pidlFolder parameter
when shell extension is called from library folders and I do not know what to
do with pidlFolder value in this case.

What I need to do to extract path from value passed to pidlFolder on call
inside libraries?

Thank you in advance!




--
mind has no limit

get=20I have not worked with Windows 7 yet, but I would imagine that the pidl

Remy Lebeau replied to Agent Sylar - First Class Hero
09-Nov-09 02:21 PM
get=20

I have not worked with Windows 7 yet, but I would imagine that the pidl =
being passed in to your extension does not actually refer to a =
physical/virtual path of any kind, and thus cannot be used with the =
SHGetPathFromIDList() and similar functions, since there is no =
associated path.  Inside your extension, you really should not be =
dealing with paths anyway.  Everything in the system is referred to by =
PIDLs, you should be using those as-is instead.  That will allow you to =
operate on all kinds of objects, especially virtualized objects.  That =
is why PIDLs were invented.

--=20
Remy Lebeau (TeamB)

Hello Remy Lebeau,Thank you for your replay!

Agent Sylar - First Class Hero replied to Remy Lebeau
11-Nov-09 10:25 AM
Hello Remy Lebeau,

Thank you for your replay!

I need to convert pidl to path, and cannot use it directly, because I have
copy tool that does not use windows copy functions to copy files.
Now it is not working on windows 7 libraries, and I want to fix this.
I searched msdn and found that maybe function SHCreateItemFromIDList will be
appropriate in this case, but now I have other problem, because vs does not
recognize it from inside my shell extension by some reason, but all is ok on
some example code I downloaded from msdn

Do you have any idea, why function is not recognized inside my shell
extension?

I have installed and set as default windows sdk v7

Thank you in advance!

--
mind has no limit

If a pidl does not represent a path to begin with, then how do you =expect

Remy Lebeau replied to Agent Sylar - First Class Hero
11-Nov-09 02:00 PM
If a pidl does not represent a path to begin with, then how do you =
expect your tool to be able to work with it?

because vs
but

Assuming your code has included shobjidl.h, then your project likely has =
_WIN32_IE defined to a value less than _WIN32_IE_IE70 (0x0700).

--=20
Remy Lebeau (TeamB)
Hello Remy Lebeau,Thank you for your replay!
Agent Sylar - First Class Hero replied to Remy Lebeau
12-Nov-09 02:32 PM
Hello Remy Lebeau,

Thank you for your replay!

You are correct, I had to change platform limitation value, but not to lower
and for higher value in order to be able to use newest functions.

Now I am back on initial problem that is what to do with pidlFolder and how?

Now when I can use SHCreateItemFromIDList function, I see that is always
fail on value returned on libraries

--
mind has no limit
I think I found some way to get path in this case, so I will test what can
Agent Sylar - First Class Hero replied to Agent Sylar - First Class Hero
12-Nov-09 04:53 PM
I think I found some way to get path in this case, so I will test what can be
done

--
mind has no limit
Post Question To EggHeadCafe