Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shortcuts to non-files

Status
Not open for further replies.

Infinity22

Programmer
Oct 3, 2003
2
GB
Hi!
I'm trying to write a toolbar, to replace the Windows quick-launch bar; but I've hit a problem.

Some shortcuts point to non-files, such as printers, drives, network connections, the recycle bin and My Computer...and I don't know how to use them.

I've tried ShellExecute() and I've tried (with varying degrees of ignorance) examples of iShellLink usage...all to no avail. I'm currently using iShellLink to find the target of a normal shortcut; but non-file shortcuts just have an ITEMID (or SHITEMID), and I can't do anything with it. ShellExecuteEx() accepts such values, but I can't do the default action, nor can I do the 'Status' action on a network connection shortcut.

Please, PLEASE help. It's driving me insane.
 
Back inte the old days there was just the filesystem, evrything you saw was aither a file or a folder.

Nowdays we talk about the Namespace and Namespace objects. Files are namespace objects and so are folders, but there are also other items duch as "This computer" the "Desktop" and other items that are namespace objects but neither a file nor a folder.

You need to read up on how to access namespace ojects and perhaps look into the field of "Windows Shell Programming".

A starting point:

/Per

if (typos) cout << &quot;My fingers are faster than my brain. Sorry for the typos.&quot;;
 
PerFnurt,
Thank you for your extremely fast response!

Unfortunately, I've already been to that area of MSDN and have studied shell programming to some extent.

Thing is...knowing what an ITEMID is isn't enough. I need to know how to perform the default action on the target (same as double-clicking its shortcut in Explorer), and how to show and handle the item's context menu. I have code for that, but it doesn't work on the 'status' menu option for network connections.

Basically, I need to do exactly the same to the shortcut as the existing Windows Quick-launch toolbar would. And I can't.

Can you - or anyone else - help with this, please?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top