• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I make NSData from cabron-Handle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I make NSData from cabron-Handle


  • Subject: Re: How do I make NSData from cabron-Handle
  • From: Ondra Cada <email@hidden>
  • Date: Sat, 26 Jan 2002 17:16:16 +0100

Finlay,

>>>>>> Finlay Dobbie (FD) wrote at Sat, 26 Jan 2002 16:09:55 +0000:
FD> >IIRC (it's a long long time I've programmed Classic), handle is just a
FD> >double pointer, right? Well, if so, you need to know the size of the
FD> >data,
FD> >and then you can do
FD> >
FD> >NSData *d=[NSData dataWithBytes:*handle length:sizeWhichYouKnow];
FD>
FD> That should be **handle, right? :-P

Wrong.

That would get the first byte (presumed Handle is declared as void**, and
using the GCC convention of being able to dereference void* as char*) of the
data, and interpreting it as an address. I very seriously doubt you would
like that ;)
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc


  • Follow-Ups:
    • Re: How do I make NSData from cabron-Handle
      • From: Thomas Jahnsen <email@hidden>
References: 
 >Re: How do I make NSData from cabron-Handle (From: Finlay Dobbie <email@hidden>)

  • Prev by Date: Re: How viable is Cocoa development?
  • Next by Date: Re: How viable is Cocoa development?
  • Previous by thread: Re: How do I make NSData from cabron-Handle
  • Next by thread: Re: How do I make NSData from cabron-Handle
  • Index(es):
    • Date
    • Thread