FROM : Bruce Johnson
DATE : Fri Jan 18 20:10:31 2008
> 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_removed>
DATE : Fri Jan 18 20:10:31 2008
> 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_removed>
| Related mails | Author | Date |
|---|---|---|
| Bruce Johnson | Jan 18, 07:28 | |
| Kyle Sluder | Jan 18, 07:43 | |
| Bruce Johnson | Jan 18, 17:25 | |
| Kyle Sluder | Jan 18, 17:42 | |
| Bruce Johnson | Jan 18, 20:10 | |
| Hamish Allan | Jan 18, 20:53 | |
| Ben Trumbull | Jan 18, 23:25 |






Cocoa mail archive

