The information in this article applies to:
SYMPTOMSWhen ShellExecuteEx is used to launch a shortcut to a program (for example, a .lnk file), the SHELLEXECUTEINFO.hProcess doesn't get initialized with the handle to the process created by ShellExecuteEx. CAUSEShellExecuteEx obtains an IContextMenu interface associated with the .lnk file and then calls IContextMenu::InvokeCommand to start the shortcut. The CMINVOKECOMMANDINFO or CMINVOKECOMMANDINFOEX structures do not contain a HPROCESS member to return through ShellExecuteEx. RESOLUTION
The target can be resolved from the shortcut by using the IShellLink interface. The target, which is a file path or an ITEMIDLIST pointer, can then be passed to ShellExecuteEx to obtain the handle to the process that is started. STATUSThis behavior is by design. MORE INFORMATION
Refer to the Platform SDK documentation on the IShellLink interface.
Q179904 HOWTO: Change the Icon of a Shortcut Through IShellLink REFERENCESFor additional information, please see the following article(s) in the
Microsoft Knowledge Base: Q179904 HOWTO: Change the Icon of a Shortcut Through IShellLink Additional query words:
Keywords : kbLinks kbNTOS400 kbWinOS2000 kbShellGrp kbWinOS95 kbWinOS98 kbDSupport |
Last Reviewed: November 24, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |