File transfer from driver

Hi,

I have a use case where I need to boot my PCI based device (for later use, of course) by transferring files to (flashing) the device. These files need to be transferred soon after the Windows boots up.

I am facing difficulty in visualizing the following things to achieve this -

  1. How and where the boot images (and few related files) will be copied during installation of the driver for the PCI device ?

  2. After driver installation, when the device is detected, the driver should be called. But I’m not sure the driver (which is in kernel mode) is capable of reading and transferring these files on its own. So, how can this be achieved?

There is good documentation on drivers but I need some guidance to proceed in the right direction. Please provide your thoughts and suggestions

Thanks in advance

It’s up to you. The files will be put wherever you located them via the INF file.

From your driver, just open the file using ZwCreateFile, read it’s contents, and flash the device.

You can do the flash operation in your driver’s EvtDeviceD0EntryPostInterruptsEnabled event processing callback,

Peter
OSR
@OSRDrivers