Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

IShellLink::GetDescription() mostly returns empty on Win98

Posted on 1999-01-29
7
Medium Priority
?
341 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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 1500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

772 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