Skip navigation.
 
mlRe: Data Structure to Data
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>

Related mailsAuthorDate
mlData Structure to Data Bruce Johnson Jan 18, 07:28
mlRe: Data Structure to Data Kyle Sluder Jan 18, 07:43
mlRe: Data Structure to Data Bruce Johnson Jan 18, 17:25
mlRe: Data Structure to Data Kyle Sluder Jan 18, 17:42
mlRe: Data Structure to Data Bruce Johnson Jan 18, 20:10
mlRe: Data Structure to Data Hamish Allan Jan 18, 20:53
mlRe: Data Structure to Data Ben Trumbull Jan 18, 23:25