Re: context questions



Hi Bruce,

Thank you very much for clarify this. I was assigned a task to port a filter
driver from XP to PPC 2003. I plan to use hook technics. In XP,
IRP_MJ_CREATE received by filter driver is in the same process context as
CreateFile in application. Therefore, kernel mode driver can directly access
memory in user mode application. But in PPC 2003 the scenario seems to be
different. What happens between a CreateFile call in one process and
Driver_Open in device.exe? Is there process context switch? Does CE map the
device name, used as the first parameter of CreateFile, from the caller
process to device.exe? And why MapPtrToProcess doesn't need to specify a
size?


"Bruce Eitman (eMVP)" <beitmannospam@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> дÈëÏûÏ¢ÐÂÎÅ:%23ojpPQRfFHA.2384@xxxxxxxxxxxxxxxxxxxxxxx
> The driver is always running in device.exe (unless you specifically do a
> LoadLibrary) so the memory is still accessible to you.
>
> Are you having a problem that you need to solve or is this just
> philisophical?
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
> beitman AT applieddata DOT net
>
> Applied Data Systems
> www.applieddata.net
> An ISO 9001:2000 Registered Company
> Microsoft WEP Gold-level Member
>
>
> "telus" <tobeno1@xxxxxxxxx> wrote in message
> news:qNHwe.100195$9A2.18194@xxxxxxxxxxx
>> Hi,
>>
>> I'm developing a driver for PPC 2003. The driver is loaded in device.exe
>> address space and is located in slot 0. During Driver_Init I allocate a
>> memory and save a pointer in a global variable in the driver. Whenever an
>> application opens the driver, I need to save some information in the
> memory.
>>
>> 1) In Driver_Open call of the driver, I'm in the application context, not
>> device.exe context, right?
>> 2) If 1) is true, how can I access the memory which is allocated in
>> Driver_Init which is in device.exe context? Do I have to add the pointer
>> with a base address of the slot of device.exe and call MapPtrToProcess?
>>
>> TIA
>>
>>
>
>


.



Relevant Pages

  • Re: User vs. Worker threads
    ... is shut down or the thread terminates itself by calling ... Driver routines that run in a process context other than that of the system ... It has all the worker threads. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Question about FILE_OBJECT
    ... I think your missing something First the driver is an ndis intermediate ... I.E. every time they allocated a new context object they ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Question about FILE_OBJECT
    ... the use of FsContext and FsContext2 are dictated by each driver in the ... PFILE_OBJECT pointer and the same pointer value you put into FsContext. ... On the open call I allocate a context structure and add it ... on susequent irp's instead of accessing the context memory at ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Problem with matching kind of NDIS driver.
    ... When it comes to outgoing packets, the reasons why his task is infeasible ... context of different threads. ... NDIS IM filter that is located immediately below ... We are telling you that in a NDIS Intermediate driver the process ...
    (microsoft.public.development.device.drivers)
  • Re: Question about FILE_OBJECT
    ... NDIS IM is a driver that fully conforms to the model, ... I.E. every time they allocated a new context object they ...
    (microsoft.public.win32.programmer.kernel)