Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ResolveAlias leads to crash



On Jul 28, 2005, at 10:51 AM, Igor Garnov wrote:

in my Carbon CFM application, a call to 'ResolveAlias' leads to crash if the object referenced by the alias being resolved has been moved to another location, or put to Trash.

Could someone comment on this? Is this function supposed to crash the entire app like this, or am I doing something wrong?

I call it like this:

ResolveAlias( 0, ( AliasRecord** )&pItemAlias, &targetFS, &bAliasWasChanged );

This function does not return - the app crashes.

If the item has moved, the alias manager will update the alias record and set fill in bAliasWasChanged as appropriate.


You pass:

    ( AliasRecord** )&pItemAlias

is pItemAlias a pointer?

You can't manufacture a handle with a cast - the alias manager is going to assume you passed it a handle and bad things will happen when it tries to do handle operations on your data if it in fact was not a handle.

Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >ResolveAlias leads to crash (From: Igor Garnov <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.