Apologies for the multiple postings, I think I posted this to the wrong group
before.
Hi,
I'm new to windows ce and am trying to write a soundcard driver for
windows ce 4.2 which I need to load multiple instances of. and seem to
be running into problems loading more than one instance.
The project is basically a directsound driver for a soundcard with 4
seperate stereo channels and I want to make each stereo 'pair' appear
to the os as a seperate sound card so calling applications can choose
which pair the output is routed to. I have managed to write a driver
that will allow this for one channel but cannot seem to load a second
instance of the driver. I have a 'loader' driver which starts on boot
up, which is listed in the registry under
HKEY_LOCAL_MACHINE\Drivers\BuiltIn\. This 'driver' (if you can call it
that) then calls ActivateDevice(L"Drivers\\custom\\AudDvr",n); where
1<=n<=4 to load the soundcard driver. This call works the first time,
however any subsequent calls fail with GetLastError returning
ERROR_DEVICE_IN_USE. This second call does not enter DllMain or
WAV_Init on the soundcard driver so I assume whatever loads the drivers
is seeing that the audio driver is already loaded and returning a fail.
My question is, does anybody know how I can ensure a new instance of
the driver is loaded on the second call, rather than the os trying to
access the existing instance? Any help/pointers will be greatfuly
received as I have been banging my head against a wall for days with
this one.
Thanks
Carl