• 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: GetParameterValueStrings requires fixed, compile time strings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GetParameterValueStrings requires fixed, compile time strings?


  • Subject: Re: GetParameterValueStrings requires fixed, compile time strings?
  • From: Art Gillespie <email@hidden>
  • Date: Tue, 8 Apr 2003 09:24:42 -0400

CFSTR creates an immutable CFStringRef from a compile-time constant string, but there are plenty of functions in CoreFoundation's String Services to create CFStringRef in a variety of different ways.

CFStringRef myCFString = CFStringCreateWithCString ( NULL, myCStringVar, 0 );

will return a CFStringRef from your c string var. Just be sure to call CFRelease() on the created CFStringRef when you're done with it.

There are a *lot* of CFStringCreateXXX functions. Check out 'String Services Concepts and Tasks' under core foundation in the Carbon docs. (if your dev tools are in the default location, this url should work: file:///Developer/Documentation/CoreFoundation/StringServices/ String_Services_ConcTask/index.html )

Hope that helps.

Art
>>0xBA


On Tuesday, April 8, 2003, at 02:32 AM, Shai Shasag wrote:

I'm implementing plugin automation using AUBase parameters.
The function GetParameterValueStrings is called for indexed parameters to get the names of each possible value of the parameter.
Apple's example shows that this function should fill in a pointer to CFArrayRef containing CFStringRef objects. The CFStringRef are created by the CFSTR function.



Problem is that, as I understand CFStringRef, these objects can only be created at compile time, like the string literals they replace. However my values are dynamically created at runtime.

Is there a way to create these strings at runtime?

Shai Shasag
Waves
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

References: 
 >GetParameterValueStrings requires fixed, compile time strings? (From: Shai Shasag <email@hidden>)

  • Prev by Date: some trivial questions
  • Next by Date: Re: AU logo
  • Previous by thread: Re: GetParameterValueStrings requires fixed, compile time strings?
  • Next by thread: AU logo
  • Index(es):
    • Date
    • Thread