Doubt sharing memory.

Hi guys,

I have a buffer in my driver that has not a fixed size. (This is the
*Irp->AssociatedIrp.SystemBuffer
in *IRP_MJ_CREATE).

So, the question is what is the best way to share this with the user level?


Heitor Meira
Undergraduate in Computer Science - www.ccc.ufcg.edu.br
Member of Distributed Systems Laboratory - www.lsd.ufcg.edu.br

Make the buffer at least ULONG size. Put the actual size of the rest of the buffer in the first 4 bytes.
Don’t for get to validate the buffer before you even access the first 4 bytes

> Hi guys,

I have a buffer in my driver that has not a fixed size. (This is the
*Irp->AssociatedIrp.SystemBuffer
in *IRP_MJ_CREATE).

So, the question is what is the best way to share this with the user
level?

Consider throwing out the entire concept of “sharing with user level”,
especially for a SystemBuffer. The idea has zero merit, and will lead
only to frustration and a poor driver. Exactly what problem do you think
this is going to solve?
joe


Heitor Meira
Undergraduate in Computer Science - www.ccc.ufcg.edu.br
Member of Distributed Systems Laboratory - www.lsd.ufcg.edu.br


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

> Make the buffer at least ULONG size. Put the actual size of the rest of

the buffer in the first 4 bytes.
Don’t for get to validate the buffer before you even access the first 4
bytes


NTFSD is sponsored by OSR

For our schedule of debugging and file system seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Sorry, the correct answer is “this is a Really Bad Idea, and is an
inappropriate solution no matter what your problem is”.
joe

We are using Dokan (http://dokan-dev.net/en/)

This thing has a bind to java, so the message need to go to the next level.

Dokan does it from driver to next level with a ExAllocatePool, is this a
good solution?

On Wed, Aug 29, 2012 at 6:36 PM, wrote:

> > Make the buffer at least ULONG size. Put the actual size of the rest of
> > the buffer in the first 4 bytes.
> > Don’t for get to validate the buffer before you even access the first 4
> > bytes
> >
> > —
> > NTFSD is sponsored by OSR
> >
> > For our schedule of debugging and file system seminars visit:
> > http://www.osr.com/seminars
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
> >
> Sorry, the correct answer is “this is a Really Bad Idea, and is an
> inappropriate solution no matter what your problem is”.
> joe
>
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule of debugging and file system seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Heitor Meira
Undergraduate in Computer Science - www.ccc.ufcg.edu.br
Member of Distributed Systems Laboratory - www.lsd.ufcg.edu.br
Member of Guardians System Administrator group - www.lcc.ufcg.edu.br

Good luck, all Dokan has ever delivered is BSOD’s.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Heitor Meira” wrote in message
news:xxxxx@ntfsd:

> We are using Dokan (http://dokan-dev.net/en/)
>
> This thing has a bind to java, so the message need to go to the next level.
>
> Dokan does it from driver to next level with a ExAllocatePool, is this a
> good solution?
>
>
> On Wed, Aug 29, 2012 at 6:36 PM, wrote:
>
> > > Make the buffer at least ULONG size. Put the actual size of the rest of
> > > the buffer in the first 4 bytes.
> > > Don’t for get to validate the buffer before you even access the first 4
> > > bytes
> > >
> > > —
> > > NTFSD is sponsored by OSR
> > >
> > > For our schedule of debugging and file system seminars visit:
> > > http://www.osr.com/seminars
> > >
> > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> > >
> > Sorry, the correct answer is “this is a Really Bad Idea, and is an
> > inappropriate solution no matter what your problem is”.
> > joe
> >
> >
> > —
> > NTFSD is sponsored by OSR
> >
> > For our schedule of debugging and file system seminars visit:
> > http://www.osr.com/seminars
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
> >
>
>
>
> –
> Heitor Meira
> Undergraduate in Computer Science - www.ccc.ufcg.edu.br
> Member of Distributed Systems Laboratory - www.lsd.ufcg.edu.br
> Member of Guardians System Administrator group - www.lcc.ufcg.edu.br