Tordex Community
Programming question - Non-filesystem shortcuts - Printable Version

+- Tordex Community (http://forum.tordex.com)
+-- Forum: True Launch Bar (http://forum.tordex.com/forum-3.html)
+--- Forum: General Discussion (http://forum.tordex.com/forum-8.html)
+--- Thread: Programming question - Non-filesystem shortcuts (/thread-903.html)



- Infinity - 09-20-2003

Hi!
Sorry to bother you chaps, but I'm trying to write a shell replacement for Windows, and I've hit a problem that you've already solved in your True Launch Bar. I would be very grateful if you could help me with this confusing problem.

The problem is that I can't launch, get properties for (etc) shortcuts which point to non-filesystem objects. By this, I mean printers, network connections, the Recycle Bin and so on. I need to be able to perform the default action upon these shortcuts (i.e. double-click functionality), show the standard context menu for them (e.g. network connections should have "Disable" and "Status" etc) and get properties for them correctly.

I've looked and looked and looked, but found no code examples of this functionality. I don't know how you've solved it, but you must have.

I am coding in C++ with MFC. I have extensive knowledge of the API, so please feel free to be technical Wink

I have no knowledge of COM, but can learn it if necessary.

Thanks in advance,
Stu.


- Yuri Kobets - 09-20-2003

First you need to learn COM. Then visit <!-- w --><a class="postlink" href="http://www.codeproject.com">www.codeproject.com</a><!-- w --> for many examples Wink


- Infinity - 09-20-2003

Hi!
I think the entirety of COM is such a vast concept as to require a number of years to learn.

Could I ask that you point me in the direction of an example code (possibly in CodeProject) specifically related to my query? I could then learn those aspects of COM that are required. I'd kinda like to get my shell replacement finished before all current versions of Windows are rendered obsolete Wink


- Yuri Kobets - 09-20-2003

The simplest way to call properties is:
ShellExecute(hwnd, "properties", "c:\\shortcut.lnk", NULL, NULL);

The other way to make full context menu support like TLB do. You must use IContextMenu, IShellFolder interfaces. You can easy find documentation on MSDN. Or try this topic from CodeProject.


- Infinity - 09-20-2003

Hi!
Thanks for the help.

I'm afraid ShellExecute() won't do properties for a network connection. However, I'll look into the links you gave and let you know how it goes.


- Infinity - 09-21-2003

The CodeProject example doesn't fully work - I still cannot get Status on a network connection. Any idea why this is?

Thanks!


- IceCaveman - 09-21-2003

Infinity stop wasting Yuri's time on this, it has nothing to do with TLB 'cause you are creating your own shell and in a way doing a "compitive" product agains TLB, why should yuri even respond to you?


- Infinity - 09-21-2003

My shell replacement is nothing like the True Launch Bar. It's a replacement for the taskbar and desktop, and so not a rival to your product.

I appreciate any help offered to me on this forum, and I don't see why kind people should not help me if they wish.

If you don't wish to help me, then please do not.