• 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: Getting the host
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the host


  • Subject: Re: Getting the host
  • From: Jeff Moore <email@hidden>
  • Date: Tue, 2 Sep 2003 11:57:32 -0700

The way to get the bundle ID of the current process, presuming it has one, is to do the following:

// get the main bundle ref of the process we are in (don't release it)
CFBundleRef theMainBundle = CFBundleGetMainBundle();
if(theMainBundle != NULL)
{
// look up the bundle ID from the main bundle (don't release it)
CFStringRef theAppBundleID = CFBundleGetIdentifier(theMainBundle);
if(theAppBundleID != NULL)
{
// do something interesting with the bundle ID
}
}

On Sep 1, 2003, at 9:38 AM, Urs Heckmann wrote:

Okay,

must have missed that...

this looks much better than what I had in mind ;-)

(I just learned to use CFStuff, parsing plists and things, so wildering the Bundle appeared to be a familar way to me)

Thanks,

;) Urs

Am Montag, 01.09.03, um 18:41 Uhr (Europe/Berlin) schrieb Marc Poirier:

I remember this issue coming up once before, and there were a couple of
suggestions for getting the process name and using that. I saved the code
snippets. One way is this:

unsigned char * appname = LMGetCurApName();

That will get you a Pascal string in return. That I think is sort of a
legacy API, and this is probably the better way:

ProcessSerialNumber currentProcess = { 0, kCurrentProcess };
CFStringRef processName = NULL;
OSStatus status = CopyProcessName(&currentProcess, &processName);

Marc



On Mon, 1 Sep 2003, Urs Heckmann wrote:

Hi,

can an AU safely grab the info plist of the host's bundle to determine
who hosts it?

are there any CFM based AU hosts?

Cheers,

;) Urs
_______________________________________________
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.



--

Jeff Moore
Core Audio
Apple
_______________________________________________
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: 
 >Re: Getting the host (From: Urs Heckmann <email@hidden>)

  • Prev by Date: Re: ObjC Framework for audio
  • Next by Date: should the mBox change my understanding of the CoreAudio API?
  • Previous by thread: Re: Getting the host
  • Next by thread: Re: Getting the host
  • Index(es):
    • Date
    • Thread