Re: A confusion about the stream interface driver

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Steve Maillet \(eMVP\) (nospam1_at_EntelechyConsulting.com)
Date: 03/25/05


Date: Fri, 25 Mar 2005 10:44:25 -0500

The exact same thread of the application is what runs in the driver the
system simply changes the process context the thread is running in. (look up
"Thread Migration" in the help or google for more details) All of the
pointers that the application passes as direct parameters to system APIs are
automatically adjusted so that the system process can access them. However,
any pointers embedded in the data those direct pointers refer to are NOT
automatically adjusted and the driver MUST use MapCallerPtr() to map them
for access from the driver. (This is because the OS cannot possibly know if
the pointer you passed points to an array of pointers or a blob of data -
only the driver would know)

-- 
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com


Relevant Pages

  • Re: [9fans] Writing device drivers
    ... Because I have a background with low-level languages like ... understanding the _why_ of using pointers in C has eluded ... I know this bears little relation to a device driver living in ... since you want to write a Plan 9 ...
    (comp.os.plan9)
  • Re: [PATCH 15/19] mc13xxx: mfd_cell is now implicitly available to drivers
    ... No need to explicitly set the cell's platform_data/data_size. ... move the various platform_data pointers ... driver_data is something that is private to the driver and has ... int ret, i; ...
    (Linux-Kernel)
  • Re: KMDF Interface : is it possible to use a c++ class ?
    ... function pointers you pass in must be static pointers since the caller will ... I'm developing a driver similar to Toaster example using Kernel Mode ... Is it possible to create an interface to export a c++ class instead of c ... functions with WdfDeviceAddQueryInterface? ...
    (microsoft.public.development.device.drivers)
  • Re: Multifunction printers for ubuntu?
    ... any pointers to get this to work? ... I just stick an SD card into the reader slot and it appears on the ... of what it's found (I have a Hauppage TV card in the box as well and Xsane ... I had to manually find the correct driver as for ...
    (Ubuntu)
  • Re: Emulate a virtual COM port
    ... IOCTL it has in there (At passive and dispatch level). ... > I have to emulate a virtual COM port in our existing functional USB ... How do I create a virtual COM port when the driver is loaded and ... > Any pointers to the API to be used or any pointers to the sample code ...
    (microsoft.public.development.device.drivers)