Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: IShellLink



Permlink Replies: 1 - Last Post: Oct 27, 2014 10:03 AM Last Post By: Remy Lebeau (Te...
stephen lukacs

Posts: 13
Registered: 6/18/12
IShellLink
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 26, 2014 7:14 PM
hello one and all,

i am using delphi XE2 and developing a pure x64bit exe application. i used IShellLink in the past to create a shortcut under the c:\Users\Public\Desktop to link a shortcut icon to my application on the desktop.

but it is not working under windows 7x64.

here is my code snipet.

var
sl : IShellLink;
pf : IPersistFile;
begin
sl := CreateComObject(CLSID_ShellLink) as IShellLink;
pf := sl as IPersistFile;
with sl do begin
SetPath(PChar(ServerDir+exe));
if (params <> '') then
SetArguments(PChar(params));
SetWorkingDirectory(PChar(local));
end;
pf.Save(PWChar(ww),False);
end;
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: IShellLink
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 27, 2014 10:03 AM   in response to: stephen lukacs in response to: stephen lukacs
stephen wrote:

but it is not working under windows 7x64.

The code snippet you showed works fine for me in a 64bit app running on Win7
x64 (provided that the ServerDir, exe, params, local, and ww variables are
all UnicodeString). What problem are you having exactly? You need to be
more specific.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02