hi all,
i am finding a problem in displaying all the files in a folder which is having all the files with long names approx 130 characters and what i do is in my create callback i convert the actual filenames (Eg. XYZ.doc into XXX.temp and xxx as xml file containing metadata) when i get a directory control request to display those files i map these temp file names to my logical names which are in my case very long and the buffer which filesystem returns is of 4096 bytes in my case so there arises a problem of buffer overrun when i copy those names in directory bufferfor displaying the logical names, i want to know that is there any way out to expand the directory buffer of IRP_MJ_DIRECTORY_CONTROL if no then can anyone suggest an alternative to accomadate these long names in the same directory buffer
thanks and regards
sankalp
Can the first file name fit at least? Copy as much as possible then, and let the system query again.
If the first file name cannot fit, then return STATUS_BUFFER_OVERFLOW and the system will query again.
xxxxx@rsystems.com wrote:
hi all,
i am finding a problem in displaying all the files in a folder which is having all the files with long names approx 130 characters and what i do is in my create callback i convert the actual filenames (Eg. XYZ.doc into XXX.temp and xxx as xml file containing metadata) when i get a directory control request to display those files i map these temp file names to my logical names which are in my case very long and the buffer which filesystem returns is of 4096 bytes in my case so there arises a problem of buffer overrun when i copy those names in directory bufferfor displaying the logical names, i want to know that is there any way out to expand the directory buffer of IRP_MJ_DIRECTORY_CONTROL if no then can anyone suggest an alternative to accomadate these long names in the same directory buffer
thanks and regards
sankalp
NTFSD is sponsored by OSR
For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
You are currently subscribed to ntfsd as: xxxxx@alfasp.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
–
Kind regards, Dejan (MSN support: xxxxx@alfasp.com)
http://www.alfasp.com
File system audit, security and encryption kits.
Hi,
The STATUS_BUFFER_OVERFLOW didnt work out well presently i am looking in the direction to expand the system buffer i am getting.is there any possiblity to do so or one other direction is like is there any way out to pend the operation from that very state from where the buffer overflow situation arised .
I don’t know if this will work or not, but here is something you could try if you haven’t already.
When you receive the request, create a new buffer large enough to hold your data, fill the buffer, free the incoming system buffer, point the system buffer to your buffer, and update the buffer size in the irp with the size of your new buffer.
Seems reasonable to me that this should work.