Re: Memory Mapping Anomaly
- From: Salah <scjkhan@xxxxxxxxxxx>
- Date: Thu, 9 Oct 2008 20:49:27 -0700 (PDT)
On Sep 19, 1:58 am, Hugo glea...@xxxxxxxxxxx> <hugh<underbar> wrote:
Thanks for these comments (I forgot to check the 'Notify' so was unaware of
these recent replies).
I think I understand this a lot better now, and have documented it
internally (we often write our own suplementary documentation on stuff like
this, if it is inst clear in MSDN or is scattered around many places) this is
then verified by systematic experimentation.
My next question is this, is it or is it not legal to referr/create object
names with a "Session\n" prefix in addition to "Gloabl\" and "Local\"?
I can, as a non privileged user, open an object from one session when the
object exists in another session (assuming security is set OK).
This is done by simply prefixing with the session id of the session names
space in which the desired object resides.
So a process running in session 3 can open a handle to a kernel object in
session 2 simply by prefixing the object name with "Session\2\". This works.
The ONLY MSDN docs I can find anywhere on this is:
http://msdn.microsoft.com/en-us/library/aa382954(VS.85).aspx
In which is explicitly refers to "Session".
It does say you can't use the prefixes as names, but that is pretty obvious.
It does mention all three prefixes in the same way, and we know that Global
and Local are legal, so it strongly implies that Session too is legal, but
not documented much.
Does anyone know more?
Thx
Hugh"Alexander Grigoriev" wrote:
I see. It was not documented in old Vista SDK; only mapping through the same
mapping object was explicitly mentioned.
"Pavel Lebedinsky [MSFT]" <pa...@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23L3jXlKFJHA.2072@xxxxxxxxxxxxxxxxxxxxxxx
By the way, in Win32 for file view coherency you cannot use different
unnamed file mapping objects of the same file in different processes..
These mapping objects will provide incoherent views.
Different file mapping objects backed by the same physical file will
produce coherent views. This is mentioned in the most recent online
docs for CreateFileMapping.
--
This posting is provided "AS IS" with no warranties, and confers no
rights.
Please do not take dependancies on such behaviour as this can change
in the future. It is not documented and just mentioning NOT to use it
as an object name in the documentation is not sufficient to consider
it documented.
Is there a real usage scenario that you see by doing this?
If you just want to share objects between sessions, you can use Global
\ or you can use private namespaces which are accessible from all
sessions (and you have complete control over who creates and who
accesses them). If the documentation for private namespaces is not
sufficient then let me know and I will post usage information here as
I'm currently in the process of working on samples for this and
working with the MSDN doc team to get this more clearly documented.
Thanks,
Salahuddin Khan [MSFT]
.
- Follow-Ups:
- Re: Memory Mapping Anomaly
- From: Hugo gleaves
- Re: Memory Mapping Anomaly
- Prev by Date: srv.sys locks shared folders
- Next by Date: Re: Memory Mapping Anomaly
- Previous by thread: srv.sys locks shared folders
- Next by thread: Re: Memory Mapping Anomaly
- Index(es):
Relevant Pages
|