PDA

View Full Version : c++ XSI Device Driver question(s)


pho
09-29-2005, 10:54 PM
Hello all,

I'm currently trying to implement an OSC (link (http://www.cnmat.berkeley.edu/OpenSoundControl) ) device driver for XSI 5.0 Foundation and this is also the first time I've used the c++ sdk.
Basically I've pulled straight from the mousedriver example and the project builds fine but when trying to trace when the callbacks were being called I didn't get any output in the log window. I've tried a few ways to print to the log window but am currently only using cout.
Just as a checklist here are the callbacks I've implemented:

extern "C" HRESULT WINAPI XSIDeviceOnDeActivate()
extern "C" HRESULT WINAPI XSIDeviceOnActivate()
extern "C" HRESULT WINAPI XSIDeviceOnUnInitialize()
extern "C" HRESULT WINAPI XSIDeviceOnInitialize()

... I also have DllMain. Nothing happens inside each callback except a trace statment and returning CStatus::OK.
Currently I'm only seeing the traces from DllMain and I can't figure out what I'm doing wrong. When I add my device to the devicemanager and even activate it I don't see any evidence of my code being executed.

Does anyone have any advice or suggested reading? :)

Thanks,
_photex

pho
09-30-2005, 10:52 AM
Ok, this problem ended up being routed in the project settings. I copied the configurations from the mouseexample.vcproj and replaced the configs in my project with them. I also had to create a *.def file listing the callbacks for the driver.
Once I have more time I will sit down and determine the actual dependency and post a follow up for anyone else who might run into this problem.

CGTalk Moderation
09-30-2005, 10:52 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.