STATUS_USER_MAPPED_FILE

Hi,

In the IRP_MJ_SET_INFORMATION pre-callback without the paging I/O flag
set I increase the size of the file. The file is saved correctly and the
size is increased. However, next time when I try to save the same file in
the IRP_MJ_SET_INFORMATION with IRP flags as 0x42 (IRP_PAGING_IO &&
IRP_INPUT_OPERATION) I get the error STATUS_USER_MAPPED_FILE. What is the
reason for this error?

Thanks,

Vishal

DISCLAIMER

This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails.

Hi,

Could anybody help me with this?

In the query information (FileAllInformation and
FileStandardInformation), directory control (bothdirectoryinformation)
callbacks I have reduced the end of file size. I have modified the read
offset to skip the header portion in the file. I am changing the file size
in set information callback (non-paging i/o) so as to increase the file
size.

During the first time the file is saved correctly and the size is
increased and header and data are placed correctly in the file. However, if
I type in some more characters and try to save the file I get the below
error for a paging ‘Set Information’ and the application throws an error
message saying “The requested operation cannot be performed on a file with a
user-mapped section open”.

I am not sure as to why my file is still mapped?

Thanks in advance,

Vishal


From: Vishal Pai [mailto:xxxxx@persistent.co.in]
Sent: Wednesday, May 24, 2006 9:40 PM
To: ‘xxxxx@lists.osr.com’
Subject: STATUS_USER_MAPPED_FILE

Hi,

In the IRP_MJ_SET_INFORMATION pre-callback without the paging I/O flag
set I increase the size of the file. The file is saved correctly and the
size is increased. However, next time when I try to save the same file in
the IRP_MJ_SET_INFORMATION with IRP flags as 0x42 (IRP_PAGING_IO &&
IRP_INPUT_OPERATION) I get the error STATUS_USER_MAPPED_FILE. What is the
reason for this error?

Thanks,

Vishal

DISCLAIMER

This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails.

You file is mapped by an application which you use for "type in some more characters ", and when you try to “reduce the end of file size” the MmCanFileBeTruncated returns errors, because the size of the user mapped file cannot be decreased.

“Vishal Pai” wrote in message news:xxxxx@ntfsd…
Hi,

Could anybody help me with this?

In the query information (FileAllInformation and FileStandardInformation), directory control (bothdirectoryinformation) callbacks I have reduced the end of file size. I have modified the read offset to skip the header portion in the file. I am changing the file size in set information callback (non-paging i/o) so as to increase the file size.

During the first time the file is saved correctly and the size is increased and header and data are placed correctly in the file. However, if I type in some more characters and try to save the file I get the below error for a paging ‘Set Information’ and the application throws an error message saying “The requested operation cannot be performed on a file with a user-mapped section open”.

I am not sure as to why my file is still mapped?

Thanks in advance,

Vishal

------------------------------------------------------------------------------

From: Vishal Pai [mailto:xxxxx@persistent.co.in]
Sent: Wednesday, May 24, 2006 9:40 PM
To: ‘xxxxx@lists.osr.com’
Subject: STATUS_USER_MAPPED_FILE

Hi,

In the IRP_MJ_SET_INFORMATION pre-callback without the paging I/O flag set I increase the size of the file. The file is saved correctly and the size is increased. However, next time when I try to save the same file in the IRP_MJ_SET_INFORMATION with IRP flags as 0x42 (IRP_PAGING_IO && IRP_INPUT_OPERATION) I get the error STATUS_USER_MAPPED_FILE. What is the reason for this error?

Thanks,

Vishal

DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails.

Hi Slava,

Many thanks for your answer. My problem is solved.

Thanks and Best Regards,

Vishal


From: Vishal Pai [mailto:xxxxx@persistent.co.in]
Sent: Thursday, May 25, 2006 4:20 PM
To: ‘xxxxx@lists.osr.com’
Subject: RE: STATUS_USER_MAPPED_FILE

Hi,

Could anybody help me with this?

In the query information (FileAllInformation and
FileStandardInformation), directory control (bothdirectoryinformation)
callbacks I have reduced the end of file size. I have modified the read
offset to skip the header portion in the file. I am changing the file size
in set information callback (non-paging i/o) so as to increase the file
size.

During the first time the file is saved correctly and the size is
increased and header and data are placed correctly in the file. However, if
I type in some more characters and try to save the file I get the below
error for a paging ‘Set Information’ and the application throws an error
message saying “The requested operation cannot be performed on a file with a
user-mapped section open”.

I am not sure as to why my file is still mapped?

Thanks in advance,

Vishal


From: Vishal Pai [mailto:xxxxx@persistent.co.in]
Sent: Wednesday, May 24, 2006 9:40 PM
To: ‘xxxxx@lists.osr.com’
Subject: STATUS_USER_MAPPED_FILE

Hi,

In the IRP_MJ_SET_INFORMATION pre-callback without the paging I/O flag
set I increase the size of the file. The file is saved correctly and the
size is increased. However, next time when I try to save the same file in
the IRP_MJ_SET_INFORMATION with IRP flags as 0x42 (IRP_PAGING_IO &&
IRP_INPUT_OPERATION) I get the error STATUS_USER_MAPPED_FILE. What is the
reason for this error?

Thanks,

Vishal

DISCLAIMER

This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails.