Re: Data Structure to Data
Re: Data Structure to Data
- Subject: Re: Data Structure to Data
- From: "Bruce Johnson" <email@hidden>
- Date: Fri, 18 Jan 2008 11:10:31 -0800
> Why would CFData dereference the pointer? You're telling it "copy the
> bytes at this address". Those bytes happen to be three unsigned ints,
> a 255-byte array, and a pointer to an unsigned int. It's doing
> exactly what you asked: copying the pointer. If it did anything else,
> what you got out of the object would not be what you put in.
Okay so there isn't a way to get it to copy what the pointer is pointing too
then.
> By the way, what do you mean the pointer goes null: *pixels (aka
> pixels[0]) == NULL, or pixels == NULL? Are you dereferencing the
> pointer on the same thread, in the same process, on the same machine?
no, no, yes, pixels[0] == NULL
> Why aren't you just using an object for this?
The source of the CFData object is not an objective-C application, it is a
straight C CLI app. The destination of the CFData object is an objective C
application. I was hoping to use the toll-free bridge between CFData and
NSData.
The CLI app runs over a long period of time, generating image data. Through
CFDistributedNotifications, I was hoping to send the image data as CFData
attached to the notification. The obj-c app would then pick the data and
convert it to a displayable image.
I got the notification part working with the CFData object working. The
only part is the image data itself wasn't coming through.
--
----
Bruce Johnson
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden