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!

C++ Displaying ShortCut Target

Status
Not open for further replies.

TalosBlack

Programmer
Jan 6, 2004
33
US
I was wondering if anyone knows what command i need to display a .LNK's target. I need to do this so if i have a shortcut to a folder in a file tree my program will be able to go to that folder. I have my program going through all the folders already by doing a recursive search implemented with _findfirst and _findnext. I found some code on the web however i'm not able to get it to compile it seems that that windows.h is being ran included twice, however i don't include it at all. I think there is a conflict between two of the header files i seem to need (#include <shlobj.h>
#include <afx.h>). At anyrate if anyone knows anything about how i can look at the target of a shortcut .LNK file or anotehr way to jump to it's target please let me know. BTW i am stuck using visual studio 4.0 at work so i can't use namespace or mscorlib (at least i don't think i can). Any help would be vastly appreciated.

Thanks

John
 
Go to http:\\msdn.microsoft.com and search for &quot;resolving shell links&quot;. You need to be comfortable using COM to do this. There is information at MSDN and in the visual C++ help files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top