Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IShelllink->Resolve shortcuts is drive A

39 views
Skip to first unread message

Jim Barry

unread,
Mar 3, 2004, 6:23:07 AM3/3/04
to
Cecil Sheng wrote:
> I am trying to resolve a shortcut whose target is at drive A( ex: a:\test.exe). When there is no diskette in drive A, an error dialog will pop, saying "No disk in drive A".
> I've tried set SLR_NO_UI, or passing a NULL hWnd when calling IShellLink -> resolve, but all fails.
> What else can i do?

This "hard error" is is coming from deeper within the system. If you look in the system event log, you will also see these error messages listed there. You can prevent the popups from appearing by calling SetErrorMode with the SEM_FAILCRITICALERRORS flag.

--
Jim Barry, MVP for Windows SDK

anon...@discussions.microsoft.com

unread,
Mar 7, 2004, 9:08:30 PM3/7/04
to
However, I tried not to Resolve it before GetPath and it
seems to work fine. I am wondering what's Resolve doing,
and is it neccessary to Resolve first?

--Cecil.

Bill Pytlovany

unread,
Mar 7, 2004, 11:26:08 PM3/7/04
to
Thanks Cecil and Jim.
This is very close to an issue I've been dealing with for a long time and never really understood where the error was coming from. I wasn't happening a lot but would occur when users had a program in their startup folder that pointed to a location that no longer existed.

Your question and response triggered my brain and sure enough solved our problem just in time for our newest version which was launched today.

Thanks!
Bill Pytlovany
WinPatrol 7.0


Rhett Gong [MSFT]

unread,
Mar 8, 2004, 4:43:11 AM3/8/04
to
Hi Cecil,
Please check the Remarks section of IShellLink::Resolve Method for
what Resolve is doing:
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/shellcc/platform/shell/reference/ifaces/ishelllink/Resolve.asp .

Have a nice day!
Rhett Gong [MSFT]
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no
rights.
Please reply to newsgroups only. Thanks.


Rhett Gong [MSFT]

unread,
Mar 10, 2004, 8:33:38 PM3/10/04
to
Resolve has two approaches to finding target objects. The first is the distributed link tracking service. If the
service is available, it can find an object that was on an NTFS version 5.0 volume and was moved to
another location on that volume. If distributed link tracking is not available or fails to find the link object,
Resolve attempts to find it with search heuristics. It first looks in the object's last known directory for an
object with a different name but the same attributes and file creation time. Next, it recursively searches
subdirectories in the vicinity of the object's last known directory.

In additional, when we call IShellLink:: Resolve with SLR_NO_UI flag set, pass NULL to hwnd parameter.
You can see a message dialog will not be popup when the resolving failed.

0 new messages