Solved

IShellLink::GetDescription() mostly returns empty on Win98

Posted on 1999-01-29
7
313 Views
Last Modified: 2013-12-03
When calling the IShellLink::GetDescription() function on .lnk files it sometimes returns the description string (they all have one) and other times returns an empty string.  I'm using the MSDN example code, so don't understand why.

What's happening and how do I get the description for all the shortcuts?
0
Comment
Question by:gnewman
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1419467
Which example are you referring to? Can you post a piece of the code?
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 1419468
Look at http://premium.microsoft.com/download/msdn/samples/3006.exe

IShellLink::GetDescrition is almost the same as IShallLink::Resolve.
0
 

Author Comment

by:gnewman
ID: 1419469
The sample is the one you mentioned:

http://premium.microsoft.com/download/msdn/samples/3006.exe

and exhibits the problem (on Win98... I can't test on Win95 or NT).  I'm compiling with MSVC++ 4.2b

For example, the shortcut that RealPlayer puts in the Start menu returns a description
but the one that MS Office Word for Windows puts in the Start menu doesn't.  Just copy those shortcuts to the Sample folder and try them to see.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 23

Expert Comment

by:chensu
ID: 1419470
Not all shortcuts have a description. The application may not use IShellLink::SetDescription when creating a shortcut. The one that MS Office Word for Windows puts in the Start menu may not contain a description at all.
0
 

Author Comment

by:gnewman
ID: 1419471
Right you are!

Perhaps the documentation on shell links isn't clear enough for me.  It seems, upon closer examination, that the Microsoft documentation about shortcuts:

"A shortcut also has a description, which is a brief string that appears below the shell link icon. By default, the description consists of the words "Shortcut to" followed by the filename of the object. The user can edit the description string by selecting it and entering a new string."

is saying that the description is optional.  So what shows to the user is the filename if there is no Description.
0
 
LVL 23

Accepted Solution

by:
chensu earned 500 total points
ID: 1419472
So, the answer is

Not all shortcuts have a description. The application may not use IShellLink::SetDescription when creating a shortcut. The one that MS Office Word for Windows puts in the Start menu may not contain a description at all.


Thank you.
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 1419473
I could have told you that. Why didn't I?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now