CFString to CString

CFString to CString

Post by sacro_thaa » Thu, 28 Jul 2005 13:32:02


Hello everyone,

one question: I know how to create a CFStringRef from a CString. But
is it possible to create a CString from a CFStringRef?

Thanks in advance!

Till

* posted via http://www.yqcomputer.com/
* please report abuse to http://www.yqcomputer.com/
 
 
 

CFString to CString

Post by Ben Arti » Thu, 28 Jul 2005 15:17:25

In article < XXXX@XXXXX.COM >,



CFStringGetCString

hth

Ben

--
If this message helped you, consider buying an item
from my wish list: < http://www.yqcomputer.com/ ;

I changed my name: < http://www.yqcomputer.com/ ;

 
 
 

CFString to CString

Post by Michael As » Thu, 28 Jul 2005 19:02:53


Use CFStringGetCString(). Depending on whether you prefer wasting time or
wasting memory, either call CFStringGetMaximumSizeForEncoding() beforehand
to figure out how large your buffer should be (don't forget to add 1 for
the null terminator), or start with something reasonably-sized and
increase it until CFStringGetCString stops returning false.
 
 
 

CFString to CString

Post by sacro_thaa » Thu, 28 Jul 2005 22:39:03

> Use CFStringGetCString(). Depending on whether you prefer wasting

Thanks. that helped a log :D

Till

* posted via http://www.yqcomputer.com/
* please report abuse to http://www.yqcomputer.com/