Click here to Skip to main content
15,886,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: html string in .lnk file Pin
ShilpiP23-May-11 22:50
ShilpiP23-May-11 22:50 
GeneralRe: html string in .lnk file Pin
limelect24-May-11 20:44
limelect24-May-11 20:44 
GeneralRe: html string in .lnk file Pin
ShilpiP24-May-11 21:09
ShilpiP24-May-11 21:09 
GeneralRe: html string in .lnk file Pin
limelect24-May-11 21:18
limelect24-May-11 21:18 
GeneralRe: html string in .lnk file Pin
ShilpiP24-May-11 21:26
ShilpiP24-May-11 21:26 
GeneralRe: html string in .lnk file Pin
limelect24-May-11 21:45
limelect24-May-11 21:45 
GeneralRe: html string in .lnk file Pin
ShilpiP24-May-11 22:36
ShilpiP24-May-11 22:36 
GeneralRe: html string in .lnk file Pin
limelect25-May-11 0:44
limelect25-May-11 0:44 
See in my source it is full path
It is crazy in my Delphi application i Dose NOT work.
i have exactly what you guise have and it dose not work
ON GETPATH

can i get from you a full SMALL application source so
i will compile it here and see the difference!!
I am an expert with Delphi but not 100% c++
I do not understand if you get the string with
getpath why it dose not work on delphi

i have 2 links as you can see in the source one works
ok the other no
I wander if FindData: TWin32FindData; is my problem since
you have it to WIN32_FIND_DATA wfd;




IObject : IUnknown;
ISLink : IShellLink;
IPFile : IPersistFile;
p:PItemIDList;
TargetName : WideString;
FindData: TWin32FindData;

s: string;
AStr: array [0..MAX_PATH] of Char;
begin

TargetName:='C:\Documents and Settings\Administrator\Desktop\AVS Video Converter HD. Perfect for home video conversion. Convert video fast and easily!.lnk';<<<<<< this is not it gives system32 for path
// TargetName:='C:\Documents and Settings\Administrator\Desktop\123FreeSolitaire.lnk';<<<<< this is ok
IObject := CreateComObject(CLSID_ShellLink) ;
ISLink := IObject as IShellLink;
IPFile := IObject as IPersistFile;
ISLink.SetPath(pChar(TargetName)) ;
{ Load file into IPersistFile object }
IPFile.Load(PWideChar(TargetName), STGM_READ);
{ Resolve the link by calling the Resolve interface function. }
ISLink.Resolve(0, SLR_UPDATE{ANY_MATCH} {or SLR_NO_UI});
{ Get all the info! }
ISLink.GetPath(AStr, MAX_PATH, FindData, SLGP_SHORTPATH);<<<<<< the same as yours
ISLink.GetWorkingDirectory(AStr, MAX_PATH);
ISLink.GetDescription(AStr, MAX_PATH);
GeneralRe: html string in .lnk file Pin
ShilpiP25-May-11 1:23
ShilpiP25-May-11 1:23 
GeneralRe: html string in .lnk file Pin
limelect25-May-11 2:36
limelect25-May-11 2:36 
GeneralRe: html string in .lnk file Pin
ShilpiP25-May-11 3:04
ShilpiP25-May-11 3:04 
GeneralRe: html string in .lnk file Pin
limelect25-May-11 3:23
limelect25-May-11 3:23 
GeneralRe: html string in .lnk file Pin
limelect25-May-11 5:12
limelect25-May-11 5:12 
GeneralRe: html string in .lnk file Pin
ShilpiP25-May-11 19:38
ShilpiP25-May-11 19:38 
GeneralRe: html string in .lnk file Pin
limelect25-May-11 19:47
limelect25-May-11 19:47 
GeneralRe: html string in .lnk file Pin
ShilpiP25-May-11 20:12
ShilpiP25-May-11 20:12 
GeneralRe: html string in .lnk file Pin
limelect25-May-11 20:20
limelect25-May-11 20:20 
GeneralRe: html string in .lnk file Pin
ShilpiP25-May-11 20:41
ShilpiP25-May-11 20:41 
GeneralRe: html string in .lnk file Pin
limelect25-May-11 21:41
limelect25-May-11 21:41 
GeneralRe: html string in .lnk file Pin
ShilpiP25-May-11 22:24
ShilpiP25-May-11 22:24 
AnswerRe: html string in .lnk file Pin
Richard MacCutchan23-May-11 23:12
mveRichard MacCutchan23-May-11 23:12 
GeneralRe: html string in .lnk file Pin
limelect24-May-11 20:40
limelect24-May-11 20:40 
GeneralRe: html string in .lnk file Pin
Richard MacCutchan24-May-11 23:21
mveRichard MacCutchan24-May-11 23:21 
GeneralRe: html string in .lnk file Pin
limelect25-May-11 0:19
limelect25-May-11 0:19 
GeneralRe: html string in .lnk file Pin
Richard MacCutchan25-May-11 1:04
mveRichard MacCutchan25-May-11 1:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.