how can i write data to Raw drive in IoRegisterLastChanceShutdownNotification?

Because i think file system is already flushed.

Are you asking how to write to a specific file? If so you need to use
FSCTL_GET_RETRIEVAL_POINTERS to get the map of the file before shutdown.
If this is a file you are creating, you need to create the file and make it
big enough for the data you plan to write.

Are you asking how to write to the raw drive? You will need to get access
to the disk and roll you own IRP’s for the request.

Note: all of this is conditional on the
IoRegisterLastChanceShutdownNotification callback allowing the work to be
done, depending on what you are trying to do exactly this may be harder than
you think.

Don Burn
Windows Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Wednesday, November 22, 2017 9:14 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] how can i write data to Raw drive in
IoRegisterLastChanceShutdownNotification?

Because i think file system is already flushed.


NTFSD is sponsored by OSR

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software
drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at
http:</http:></http:>

Thank you Don for your reply.

Yes i want Write data to Raw Disk Sectors before shutdown