Can I monitor the partition's formating action?

I want to write a disk filter driver, can I capture the partition format
action? That before format I want to do some my action.
Thanks.

Sure, just handle IRP_MJ_WRITE coming down the disk stack. If you are below
disk.sys, then you will have to handle SRBs.

“Sun Jiajie” wrote in message news:xxxxx@ntdev…
>I want to write a disk filter driver, can I capture the partition format
>action? That before format I want to do some my action.
> Thanks.
>
>

No you cannot, formatting is just a serie of writes.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Sun Jiajie”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 31, 2006 5:54 AM
Subject: [ntdev] Can I monitor the partition’s formating action?

> I want to write a disk filter driver, can I capture the partition format
> action? That before format I want to do some my action.
> Thanks.
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer