Solved

LNK and Shortcut format

Posted on 1998-12-02
5
1,071 Views
Last Modified: 2012-06-27
Does anyone know the layout of a .LNK shortcut file? I need to know how to read the path, executable, default directory, title, icon location, etc. from the raw file. Hopefully a "C" structure format.
0
Comment
Question by:MorrisR
  • 3
5 Comments
 
LVL 5

Accepted Solution

by:
scrapdog earned 100 total points
Comment Utility
0
 

Author Comment

by:MorrisR
Comment Utility
I already have the LNK.ZIP from that site. The example doesn't provide me with all the details of a LNK file. A LNK file is not that big. I can see the sections: comment, start directory, executable, path, volume label, parameters being passed, where the display icon come from, etc. However, I can see and understand these things visually because I know what I set them too - but I can not understand the pattern in which they are placed. I can see a DWORD for size and then a non null terminated text field. I need to decipher them programmatically.
0
 
LVL 5

Expert Comment

by:scrapdog
Comment Utility
I can't really help you here.

But with there being a non-null terminated text field, I can infer that either the string is of fixed-length, or the size of the string is stored somewhere in the file (kind of like the way pascal strings are stored).

Your best bet is to run several LNK files thru a hex editor and see if this is a fixed length string.  If not, find out how long the text string is, then search for that byte that represents this length in the file.  If it is consistent, between files, chances are that this is the place where the length of the string is stored.

You probably would have been wise to reject the answer if it didn't work for you.  Now if anyone knows the answer, they will have to post it in the form of a comment, AND they will have to pay the 10 PAQ points to see the question.  So I suppose that you will have to post another question in order for others to see it.  

I will help you if I can.

0
 
LVL 5

Expert Comment

by:scrapdog
Comment Utility
I posted a message at customer service to see if they can unaccept the question or get your points back.
0
 
LVL 7

Expert Comment

by:linda101698
Comment Utility
Thanks scrapdog for following up on this question.

MorrisR
I have added the points assigned to this question back to his account so he can post another question.

Linda Gardner
Customer Service @ Experts Exchange
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

728 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

14 Experts available now in Live!

Get 1:1 Help Now