Re: how to check shared memory created by ExAllocatePoolWithTag using winobj.exe? by su_yu
su_yu
Tue Jun 22 18:06:49 CDT 2004
Peter,
Thanks a lot.
What I am trying to do is create a virtual disk driver, like "J:",
"K:", which foward all the actions, like open, save, close and etc, to
my application.
So I need to register a wdm driver, send/receive data to/from
application.
Is there any standard way to do so? Any sample code I can use?
Thanks in advance.
Jack
"Peter Wieland [MSFT]" <peterwie@online.microsoft.com> wrote in message news:<OAy0EPIWEHA.3012@tk2msftngp13.phx.gbl>...
> pool has NOTHING to do with shared memory. Pool is kernel memory (the
> equivalent of the heap in user-mode). The tag is an aribtrary 32-bit value
> you assign to your allocations (typically it's four meaningful characters
> like 'MpaM') - it's completely meaningless to anyone else. There are
> debugger extensions (!pool, !poolfind, !poolused, etc...) that will let you
> look at how much memory is allocated to a particular tag, find memory
> allocations using a tag, or examine the pool structures when memory is
> corrupted.
>
> In order to use shared memory you first need to create a section object,
> then you need to map a view of that object into your address space. You
> can't just share any arbitrary portion of any processes address space the
> way you can with a section object.
>
> The Win32 APIs that create and open named objects (sections, events, etc...)
> use BaseNamedObjects as their root directory. When you call CreateEvent
> with a name, the routine creates the event object in \BaseNamedObjects.
>
> Mutants are synchronization objects (mutexes in win32). Shared memory
> objects will show up as section objects.
>
> in general you should avoid trying to use shared memory between your driver
> and a client application. It's difficult to get right, difficult to make
> secure, and there are other perfectly functional alternatives that tend to
> work better within windows. If you tell us what you're really trying to do
> perhaps we can help.
>
> -p
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "JackSu" <su_yu@yahoo.com> wrote in message
> news:8e35816c.0406220814.1356a991@posting.google.com...
> >I created one shared memory from ExAllocatePoolWithTag with tag
> > "MpaM", but I couldn't find it in winobj.exe.
> >
> > Also, does all the shared memory will be shown in BaseNamedObjects
> > with type Mutant?
> >
> > Thanks