Re: Can we link a windows driver (.sys) with our own code ?...
- From: "Gary G. Little" <glittle@xxxxxxxxx>
- Date: Tue, 29 Nov 2005 00:33:41 GMT
Basically you cannot directly call kernel code, including your driver, from
the application layer. At best you will BSOD, at worst your system will
implode and become a smoking pile of excrement.
What you can do is one of several things:
Use inverted callbacks: see the OSR Online article concerning that.
Use IOCTL calls.
Use a filter that uses IOCTLs to directly call entry points in the target
driver.
--
Gary G. Little
"zhiyuan" <gis93536@xxxxxxxxxxxxxxx> wrote in message
news:OE7ZiBA9FHA.808@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> Do anybody know how to link a windows driver (.sys) file with our own
> object file ?
>
> Our goal is to intercept the function calls that the driver invokes to
> the windows kernel.
> Once a function call is intercepted, we can do some preprocessing jobs,
> such as logging the
> number of invocations, etc.
>
> For example, if a driver invokes a function foo() provided by the windows
> kernel, we can implement a fake foo() and
> link it with the driver so as to intercept the function call. The fake
> foo() performs the following 2 jobs.
> First, it does some preprocessing job. Second, it calls the real foo() of
> the windows kernel.
>
> So, we need to ...
>
> 1. Obtain the symbols of the .sys driver to get the names of the functions
> that called by the driver to the kernel.
> Note: We don't have the source code of the driver, only the .sys file is
> available.
>
> 2. Link our interception code (i.e., fake functions) with the .sys driver.
>
> The question is that is it possible to achieve the above jobs. If it is
> possible, how ?
>
> Thanks very much for your help!
>
.
- Follow-Ups:
- References:
- Prev by Date: Re: GetScatterGatherList() for bidirectional DMA ?
- Next by Date: Re: GetScatterGatherList() for bidirectional DMA ?
- Previous by thread: Re: Can we link a windows driver (.sys) with our own code ?...
- Next by thread: Re: Can we link a windows driver (.sys) with our own code ?...
- Index(es):
Relevant Pages
|