Re: Question about different ways of calling a driver

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi Valter and Dean,

Thanks both of your comment. The reason why I have to use scenario B is
because my cutsomer wants to only call 1 function to finish a task(They
want to skip the troublsome CreateFile, DeviceIOControl etc.). I have
come up with a work around and don't know if it is ok or not. I still
let my customer to directly load and execute my dll. But in my dll, I
do all the stuff (CreateFile, DeviceIOContol etc) for my cutomer. Is it
for the above to reside into 1 single dll? Or I have to split it into
2?

I also don't know why my NandFlash driver calls "OALPaToVa"(The driver
is included in the BSP package supplied by the chip provider). I guess
it may have other special purpose

Thanks,
Nicholas

Dean Ramsier wrote:
Also, you shouldn't be calling OALPaToVa from a driver. That is an OAL
function...

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Valter Minute" <v_a_l_t_e_r.m_i_n_u_t_e@xxxxxxxxxxxxx> wrote in message
news:Xns98609B8A5D8A6VALTERMINUTE@xxxxxxxxxxxxxxxx
eg_yskaa@xxxxxxxxxxxx wrote in
news:1161176648.267665.176330@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:

Hi all,

I have a question about the difference between 2 ways of calling a
driver. I have created a stream driver and defined some functions
in the .def file.
[...]
Can anybody please tell me what is the difference between scenario
A and B? Because I am forced to use scenario B to call a driver.
Any comment is appreciated. Thanks!

In scenario B you aren't calling a driver. You are loading a DLL and
calling it's functions and it's something very different.
The driver is made to run inside device.exe and have some
privileges. It also will be loaded only once (unless you have
multiple instances of the same device, of course) and each call to
it's streaming IO interface will pass throught device.exe allowing
it to store data shared between different "sessions" and to
syncronize access to its methods using simply a critical section.
Loading it inside an application may work (in CE 5, not in CE6) if
your application is the only application accessing the driver, but
it's not a good solution.
You said that you can't use "scenario A". Why?

--
Valter Minute
(the reply address of this message is invalid)
(l'indirizzo di reply di questo messaggio non è valido)

.



Relevant Pages

  • Re: 110mph in a 30mph zone!!
    ... people who simply make a mistake. ... because in that scenario *you* are the victim and all ... that they weren't speeding and dealt with your mistake entirely? ... the other driver, but your grieving relatives might have. ...
    (uk.rec.driving)
  • Re: 110mph in a 30mph zone!!
    ... people who simply make a mistake. ... the vicinity of your car. ... because in that scenario *you* are the victim and all ... the other driver, but your grieving relatives might have. ...
    (uk.rec.driving)
  • Re: 110mph in a 30mph zone!!
    ... people who simply make a mistake. ... the other driver, but your grieving relatives might have. ... scenario, whereas naive newbies make best case assumptions. ... you write rite, and have the right to copyright the rite you ...
    (uk.rec.driving)
  • Re: USB not detected - help
    ... Scenario 1: ... will pass over the USB bus is the device identification data. ... debugzones in your usb host driver, you should see some information about ... Try to open the CAB file on your PC. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Question about different ways of calling a driver
    ... you shouldn't be calling OALPaToVa from a driver. ... Because I am forced to use scenario B to call a driver. ... (l'indirizzo di reply di questo messaggio non è ...
    (microsoft.public.windowsce.platbuilder)