I declare a variable like this: UInt8* pItemAlias. Then I allocate
memory like this: pItemAlias = NewPtr( aliasSize ); (aliasSize
contains the actual alias size), and copy the actual alias data
into this allocated memory.
So I could cast my pointer to AliasPtr, couldn't I?
And after that, wouldn't a call like: 'ResolveAlias( 0,
&pItemAlias, ... ) be legal?
No, because ResolveAlias is expecting a handle so it can reallocate
the memory if needed and still point to it in the master pointer (the
handle).
Otherwise, what can I do to create a valid alias handle with the
data I store internally?
AliasHandle alias = (AliasHandle)NewHandle(sizeOfYourData);
That is, only if your data was taken from a valid AliasHandle. That's
really the only way to get valid alias data (i.e. from a real
AliasHandle created by one of the NewAlias routines).
_______________________________________________
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