Interaction between shell32.ShellExecute, IContextMenu and the ShellLink object?

Kevin Koltzau kevin at plop.org
Fri Sep 23 08:46:06 CDT 2005


On Friday 23 September 2005 4:10 am, Mike McCormack wrote:
> Hi All,
> The question is, through which interface (or set of interfaces) does
> shell32 invoke the Shelllink object?
>
>  From what I can determine, ShellExecute should use the .lnk extension
> to look in the registry (HKCR\.lnk -> HKCR\lnkfile\CLSID) and get
> CLSID_ShellLink.  Using the CLSID, it calls CoCreateInstance, then
> IShellExtInit->Initialize() which loads the .lnk file.
>
> Unfortunately, the next step is unclear to me.  I think that
> IContextMenu->InvokeCommand is used, but I'm not sure as to how.

Pass the result of IShellLink::GetIDList to IShellFolder::GetUIObjectOf to get 
an IContextMenu
Or if IShellLink::GetIDList fails, you could pass IShellLink::GetPath to 
IShellFolder::ParseDisplayName first
Then call IContextMenu::InvokeCommand



More information about the wine-devel mailing list