Re: Device Driver that uploads it's own code?

Anyway, if you need dynamically extend functionality of your application,
look into direction of plugin based system. You can have plugins of both
types: user mode and kernel mode. If you design a well interfaces, the whole
system might be powerful in terms of extensibility.

This posting is provided "AS IS" with no warranties, and confers no
"Volodymyr M. Shcherbyna" <v_scherbina@xxxxxxxxxxxxxxx> wrote in message

Is it possible to have only the outer skeleton of a device driver, where
the inner code logic is uploaded at runtime from the users own
application that uses the driver?

Yes. It is possible, but the code you pass from user mode is just unable
to be run in kernel mode without special preprocessings. The problem is
that user mode code usually calls some functions, which are not present in
kernel mode.So you need to pass a simplest code which does not rely on
api, or preprocess the code, so that the offsets to import functions point
to the simular or the same procedure in kernel mode (this task is

I'd like to give UserMode applications full control/configuration and
runtime alteration of the driver's behavior. For example, if the driver
must deal with complicated timing and sequencing issues on real-time
in/out data streams, and those issues are not know until runtime or might
even change during the application's runtime, how else can that be coped
with? Seem impractical to have a library of 1,000's of slightly different
device drivers and always be unloading reloading different drivers to
accommodate different functionality that changes on-the-fly. Or to have
a mega-driver with millions of different code branches to account for all
possible combinations.


Well, believe me, kernel mode programming is not an easy thing. Its better
to use decomposition approach: devide task into small sub tasks, which are
solved by appropriate module (driver).

Maybe this is what is meant by UserMode driver? I'm still not clear on
difference between a KernalMode and UserMode driver, and under which
situations I would use either one, and their respective advantages

It depends on what you are trying to accomplish. Give us more info.

Is there some kind of digital signature that's within all .SYS files,
which is tested for validity before it's allowed to load or run?
If so, is there a "hack" workaround to get past such limitations?

You have to sign binaries in x64 version of Vista and further OS. Why
would you need to hack it?

This posting is provided "AS IS" with no warranties, and confers no