| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Message: 8
Date: Tue, 1 Feb 2005 12:11:50 -0800
From: Jeff Moore <email@hidden>
Subject: Re: Initializing static C++ class variable in a HAL plugin
To: CoreAudio API <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset="iso-8859-1"
I see. Yes, the first call your app makes to the HAL will load the
plug-in. It wasn't clear from your earlier postings that this was the
case.
At any rate, I'm not sure I understand what you are doing, so correct
me please:
1) You have an application that wants to use some kind of back channel
communication to talk to your HAL plug-in.
2) The back channel is statically initialized global variables in the
the plug-in's dyld.
My question is how does the app get access to the plug-in's globals? Is
it linking against the plug-in, which exports the appropriate symbols?
It sounds like it to me, because I think that the problem you seeing is
aliasing. Your app is getting your plug-in loaded twice. Once by the
loader when the process boots up and again by the HAL when it loads the
bundle. Consequently, your app is seeing dead globals that aren't
actually getting initialized, whereas your plug-in is working fine with
the correct set of globals.
The right way to communicate with a dynamically loaded bundle is via
CFBundle calls, CFPlugIn calls, or low-level dyld calls. However you do
it, the app has to get ahold of the thing that the HAL loads, and then
dynamically load the symbols it needs (or interface if it uses
CFPlugIn).
On Feb 1, 2005, at 2:47 AM, Stéphane Letz wrote:
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.