Hi ,
I have a problem.
I have allocated a buffer in the kernel mode driver
of size PAGE_SIZE.
I want to share this buffer with user mode.
I got the user mode virtual adress from the function
MmMapLockedPagesSpecifyCache by passing the
Accessmode parameter as UserMode.
I passed this adress to the user mode thru an IOCTL.
now when i try to read this adress (buffer )from the
user mode i get a Invalid memory adress exception and
the user mode program crashes.
Till now i havent been able to figure out this
problem but i am still working on it.
Please suggest some ideas.
Thank you so much.
– Harshal
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Don’t you want to try to do the things in the oppisite way? I mean allocate
the memory in the UserMode app, call DeviceIoControl() passing virtual
address of the buffer to KernelMode driver and calling
MmProbeAndLockPages() in calling thread context and MmGetSystemAddress() in
arbitrary thread context to access the memory region you’ve allocated?
On 07/14/01, “Rock ” wrote:
> Hi ,
> I have a problem.
> I have allocated a buffer in the kernel mode driver
> of size PAGE_SIZE.
> I want to share this buffer with user mode.
> I got the user mode virtual adress from the function
>
> MmMapLockedPagesSpecifyCache by passing the
> Accessmode parameter as UserMode.
> I passed this adress to the user mode thru an IOCTL.
> now when i try to read this adress (buffer )from the
> user mode i get a Invalid memory adress exception and
> the user mode program crashes.
> Till now i havent been able to figure out this
> problem but i am still working on it.
> Please suggest some ideas.
>
> Thank you so much.
>
> – Harshal
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>
> —
> You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
—
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Are you calling MmMapLockedPagesSpecifyCache in the right process?
The process that will use the virtual address in user-mode?
Dave Cox
Hewlett-Packard Co.
SSO/OVBU/SRM (Santa Barbara)
https://ecardfile.com/id/Dave+Cox
-----Original Message-----
From: Rock [mailto:xxxxx@yahoo.com]
Sent: Saturday, July 14, 2001 12:23 AM
To: NT Developers Interest List
Subject: [ntdev] Shared Memory Problem
Hi ,
I have a problem.
I have allocated a buffer in the kernel mode driver
of size PAGE_SIZE.
I want to share this buffer with user mode.
I got the user mode virtual adress from the function
MmMapLockedPagesSpecifyCache by passing the
Accessmode parameter as UserMode.
I passed this adress to the user mode thru an IOCTL.
now when i try to read this adress (buffer )from the
user mode i get a Invalid memory adress exception and
the user mode program crashes.
Till now i havent been able to figure out this
problem but i am still working on it.
Please suggest some ideas.
Thank you so much.
– Harshal
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
You are currently subscribed to ntdev as: david_cox2@hp.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com