Programming question - Non-filesystem shortcuts
Started by Infinity


Rate this topic
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5


7 posts in this topic
Infinity
Junior Member
**


0
5 posts 1 threads Joined: Sep 2003
09-20-2003, 11:43 AM -
#1
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
Posting Freak
*****


10
6,208 posts 429 threads Joined: Jan 2002
09-20-2003, 03:11 PM -
#2
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
The TORDEX Team
http://www.tordex.com
Infinity
Junior Member
**


0
5 posts 1 threads Joined: Sep 2003
09-20-2003, 04:02 PM -
#3
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
Posting Freak
*****


10
6,208 posts 429 threads Joined: Jan 2002
09-20-2003, 04:34 PM -
#4
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.
The TORDEX Team
http://www.tordex.com
Infinity
Junior Member
**


0
5 posts 1 threads Joined: Sep 2003
09-20-2003, 04:48 PM -
#5
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
Junior Member
**


0
5 posts 1 threads Joined: Sep 2003
09-21-2003, 02:57 AM -
#6
The CodeProject example doesn't fully work - I still cannot get Status on a network connection. Any idea why this is?

Thanks!
IceCaveman
Member
***


0
213 posts 52 threads Joined: Jan 2003
09-21-2003, 08:26 AM -
#7
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
Junior Member
**


0
5 posts 1 threads Joined: Sep 2003
09-21-2003, 11:35 AM -
#8
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.


Forum Jump:


Users browsing this thread: 2 Guest(s)