I have the prototype (from the ntddk.h).
NTKERNELAPI NTSTATUS MmMapViewInSystemSpace (IN PVOID Section,
OUT PVOID MappedBase, IN PULONG ViewSize);
I assume the Section is the handle to the section object. But what is
MappedBase? In addition, is the ViewSize simply the size of my file?
thanks in advance. jb
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
The first parameter to MmMapViewInSystemSpace is NOT a handle to a section
object, it is a pointer to a section object. Pointers and handles are not
the same thing. Handles on NT are analogous to file descriptors on UNIX
with the addition that NT handles may reference a number of different types
of objects whereas UNIX file descriptors may only reference file objects.
You have to take the handle given to you by ZwCreateSection and obtain a
pointer to the section object by calling ObReferenceObjectByHandle with the
section handle as a parameter. Don’t forget to later call
ObDereferenceObject on the section object pointer as well as ZwClose on the
section handle.
MappedBase is used to return the pointer to the mapped memory. ViewSize is
the amount of memory you want mapped. There is no documentation that I’ve
seen, just a prototype in NTDDK.H.
-----Original Message-----
From: xxxxx@earthlink.net [mailto:xxxxx@earthlink.net]
Sent: Thursday, January 18, 2001 10:11 AM
To: File Systems Developers
Subject: [ntfsd] Sorry - clarifying question on MmMapViewInSystemSpace
I have the prototype (from the ntddk.h).
NTKERNELAPI NTSTATUS MmMapViewInSystemSpace (IN PVOID Section,
OUT PVOID MappedBase, IN PULONG ViewSize);
I assume the Section is the handle to the section object.
But what is
MappedBase? In addition, is the ViewSize simply the size of my file?
thanks in advance. jb
You are currently subscribed to ntfsd as: xxxxx@nsisw.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
— xxxxx@earthlink.net wrote:
I have the prototype (from the ntddk.h).
NTKERNELAPI NTSTATUS MmMapViewInSystemSpace (IN
PVOID Section,
OUT PVOID MappedBase, IN PULONG ViewSize);
-
PVOID Section is not a handle , not a pointer to
a section object. In your case pass the output of
ObReferenceObjectByHandle.
-
OUT prefix usualy means that a value is retuned
there. In this case , the variable will contain a
pointer to your mapped view.
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com