Hello Everyone,
When I try opening any file in notepad thru’ my network redirector, I get a
strange error saying ‘Not enough memory to complete this operation…’. The
same file opens perfectly in Wordpad.
The last few operations include QUERY_INFORMATION and
QUERY_VOLUME_INFORMATION, both resulting in Buffer Overflow. But the buffer
size sent by IO Manager is actually less than that required, so overflow.
Has this got to do with the notepad problem that I am facing. Or is there
anything specific to structure ‘FileAllInformation’, since Wordpad seems to
work properly without any problem and it doesn’t call FileAllInformation but
Notepad does.
Any help would be greatly appreciated.
Thanks in Advance,
Regards,
Ram.
“Ram Kumar” writes:
> The last few operations include QUERY_INFORMATION and
> QUERY_VOLUME_INFORMATION, both resulting in Buffer Overflow. But the buffer
> size sent by IO Manager is actually less than that required, so overflow.
>
You’re still expected to use the available buffer to report as much info as
possible, while still reporting overflow. Do you? FileAllInformation is
often requested with a buffer size of the actual struct’s when the filename
is not of interest.
/Tomas
Thanks very much Tomas,
Yes, I am filling the available buffer and then sending the Overflow status.
To be more particular all the structures are filled and then before filling
the Name information I have put a check for buffer length and leaving for
overflow here. But still the problem exists and now it looks like this
overflow thing is not the problem. Can there be anything specific to file
size that is given to Notepad, etc.
Any help would be greatly appreciated.
Thanks and Regards,
Ram
“Tomas Olsson” wrote in message news:xxxxx@ntfsd…
>
> “Ram Kumar” writes:
>
> > The last few operations include QUERY_INFORMATION and
> > QUERY_VOLUME_INFORMATION, both resulting in Buffer Overflow. But the
buffer
> > size sent by IO Manager is actually less than that required, so
overflow.
> >
> You’re still expected to use the available buffer to report as much info
as
> possible, while still reporting overflow. Do you? FileAllInformation is
> often requested with a buffer size of the actual struct’s when the
filename
> is not of interest.
>
> /Tomas
>
>
>
“Ram Kumar” writes:
> But still the problem exists and now it looks like this overflow thing is
> not the problem. Can there be anything specific to file size that is
> given to Notepad, etc.
>
I really don’t know, but notepad uses file mapping a lot. You might want to
check that you have those things set up properly
(FileObject->SectionObjectPointer), and that MapViewOfFile and friends work
ok.
/Tomas