• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 813
  • Last Modified:

URL Shortcuts in C++ MFC

I've figured out how to process IShellLink objects in MFC, but I also want to be able to handle .url files and special shortcuts like network neighbourhood and links to network shares. How do I do this?
0
williamjm
Asked:
williamjm
  • 2
1 Solution
 
dstCommented:
First of all: MFC SUCKS!!
Secondly: Maybe you can use ShellExecute()
0
 
chensuCommented:
A URL shortcut is a plain text file, which looks like the following.

[InternetShortcut]
URL=http://www.experts-exchange.com/topics/comp/lang/cplusplus/U.williamjm

To create a shell link to an object that is not a file, use IShellLink::SetIDList instead of IShellLink::SetPath. You may get the PIDL by using the SHGetSpecialFolderLocation function.
0
 
williamjmAuthor Commented:
Great stuff...I should have thought of dumping the file to check its format.
Thanks.  I still have to look into how network neighbourhood works; is there anywhere I can find out about the specific ids? Or do I just experiment?
0
 
chensuCommented:
As I mentioned, use the SHGetSpecialFolderLocation function with CSIDL_NETWORK to get the PIDL for Network Neighborhood.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now