Is there any notification of formating a partition?
I tried IoRegisterPlugPlayNotification with GUID_DEVINTERFACE_VOLUME. But it
just works when there is a partition arrived or removed. So, is there any
such callback in kernel or message in user mode?
Thanks in advance.
–
Regards,
ZG [@ Sydney]
Windows Driver Developer
[Remove ‘stopspam’ & ‘nospam’ when you send email to me]
Formatting is something you do to the contents of the volume. There is no
reliable means to determine when a volume is being formatted, because the
meaning of formatting varies from filesystem to filesystem. For example, if
I open the raw volume device object, and write an arbitrary pattern to every
sector, am I formatting the volume? Or simply destroying it?
Bottom line, there’s no reliable way. What are you trying to achieve? Are
you trying to prevent people from formatting a drive? If so, there are ACLs
for that already.
– arlie
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of ZG
Sent: Thursday, December 08, 2005 5:45 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Notification of formating a partition
Hello all:
Is there any notification of formating a partition?
I tried IoRegisterPlugPlayNotification with GUID_DEVINTERFACE_VOLUME. But it
just works when there is a partition arrived or removed. So, is there any
such callback in kernel or message in user mode?
Thanks in advance.
–
Regards,
ZG [@ Sydney]
Windows Driver Developer
[Remove ‘stopspam’ & ‘nospam’ when you send email to me]
Well, I’m working on a disk monitor driver which collects every partition’s
information. This information includes the partition’s format (such as
NTFS/FAT). Now, when a NTFS partition is formatted in FAT32, my drive cannot
know this.
No other way except reading the relative sectors periodically?
–
Regards,
ZG [@ Sydney]
Windows Driver Developer
“Arlie Davis” wrote in message news:xxxxx@ntdev… > Formatting is something you do to the contents of the volume. There is no > reliable means to determine when a volume is being formatted, because the > meaning of formatting varies from filesystem to filesystem. For example, > if > I open the raw volume device object, and write an arbitrary pattern to > every > sector, am I formatting the volume? Or simply destroying it? > > Bottom line, there’s no reliable way. What are you trying to achieve? > Are > you trying to prevent people from formatting a drive? If so, there are > ACLs > for that already. > > – arlie > > > -----Original Message----- > From: xxxxx@lists.osr.com > [mailto:xxxxx@lists.osr.com] On Behalf Of ZG > Sent: Thursday, December 08, 2005 5:45 AM > To: Windows System Software Devs Interest List > Subject: [ntdev] Notification of formating a partition > > Hello all: > > Is there any notification of formating a partition? > > I tried IoRegisterPlugPlayNotification with GUID_DEVINTERFACE_VOLUME. But > it > just works when there is a partition arrived or removed. So, is there any > such callback in kernel or message in user mode? > > Thanks in advance. > > – > > Regards, > ZG [@ Sydney] > Windows Driver Developer > [Remove ‘stopspam’ & ‘nospam’ when you send email to me] > > > > > — > Questions? First check the Kernel Driver FAQ at > http://www.osronline.com/article.cfm?id=256 > > You are currently subscribed to ntdev as: xxxxx@stonestreetone.com To > unsubscribe send a blank email to xxxxx@lists.osr.com > > > >
Have you tried listening for the events (as specified in
sdk\inc\IOEVENT.H). Sure’s it’s a little painful to setup the first
time (setting up a DeviceNotificationFunction and all), but you’d be
surprised at the amount of things you can get informed about
(asynchronously) about a device and/or volume.
.
-----Original Message-----
From: ZG [mailto:xxxxx@ybwork.com]
Sent: Thursday, December 08, 2005 2:37 PM
Subject: Re: Notification of formating a partition
Well, I’m working on a disk monitor driver which collects every
partition’s
information. This information includes the partition’s format (such as
NTFS/FAT). Now, when a NTFS partition is formatted in FAT32, my drive
cannot
know this.
No other way except reading the relative sectors periodically?
–
Regards,
ZG [@ Sydney]
Windows Driver Developer
“Arlie Davis” wrote in message news:xxxxx@ntdev… > Formatting is something you do to the contents of the volume. There is no > reliable means to determine when a volume is being formatted, because the > meaning of formatting varies from filesystem to filesystem. For example, > if > I open the raw volume device object, and write an arbitrary pattern to
> every > sector, am I formatting the volume? Or simply destroying it? > > Bottom line, there’s no reliable way. What are you trying to achieve?
> Are > you trying to prevent people from formatting a drive? If so, there are > ACLs > for that already. > > – arlie > > > -----Original Message----- > From: xxxxx@lists.osr.com > [mailto:xxxxx@lists.osr.com] On Behalf Of ZG > Sent: Thursday, December 08, 2005 5:45 AM > To: Windows System Software Devs Interest List > Subject: [ntdev] Notification of formating a partition > > Hello all: > > Is there any notification of formating a partition? > > I tried IoRegisterPlugPlayNotification with GUID_DEVINTERFACE_VOLUME. But > it > just works when there is a partition arrived or removed. So, is there any > such callback in kernel or message in user mode? > > Thanks in advance. > > – > > Regards, > ZG [@ Sydney] > Windows Driver Developer > [Remove ‘stopspam’ & ‘nospam’ when you send email to me] > > > > > — > Questions? First check the Kernel Driver FAQ at > http://www.osronline.com/article.cfm?id=256 > > You are currently subscribed to ntdev as: xxxxx@stonestreetone.com To > unsubscribe send a blank email to xxxxx@lists.osr.com > > > >
----- Original Message -----
From: “ZG” Newsgroups: ntdev To: “Windows System Software Devs Interest List” Sent: Friday, December 09, 2005 1:37 AM Subject: Re:[ntdev] Notification of formating a partition
> Well, I’m working on a disk monitor driver which collects every partition’s > information. This information includes the partition’s format (such as > NTFS/FAT). Now, when a NTFS partition is formatted in FAT32, my drive cannot > know this. > > No other way except reading the relative sectors periodically? > > – > > Regards, > ZG [@ Sydney] > Windows Driver Developer > > > “Arlie Davis” wrote in message > news:xxxxx@ntdev… > > Formatting is something you do to the contents of the volume. There is no > > reliable means to determine when a volume is being formatted, because the > > meaning of formatting varies from filesystem to filesystem. For example, > > if > > I open the raw volume device object, and write an arbitrary pattern to > > every > > sector, am I formatting the volume? Or simply destroying it? > > > > Bottom line, there’s no reliable way. What are you trying to achieve? > > Are > > you trying to prevent people from formatting a drive? If so, there are > > ACLs > > for that already. > > > > – arlie > > > > > > -----Original Message----- > > From: xxxxx@lists.osr.com > > [mailto:xxxxx@lists.osr.com] On Behalf Of ZG > > Sent: Thursday, December 08, 2005 5:45 AM > > To: Windows System Software Devs Interest List > > Subject: [ntdev] Notification of formating a partition > > > > Hello all: > > > > Is there any notification of formating a partition? > > > > I tried IoRegisterPlugPlayNotification with GUID_DEVINTERFACE_VOLUME. But > > it > > just works when there is a partition arrived or removed. So, is there any > > such callback in kernel or message in user mode? > > > > Thanks in advance. > > > > – > > > > Regards, > > ZG [@ Sydney] > > Windows Driver Developer > > [Remove ‘stopspam’ & ‘nospam’ when you send email to me] > > > > > > > > > > — > > Questions? First check the Kernel Driver FAQ at > > http://www.osronline.com/article.cfm?id=256 > > > > You are currently subscribed to ntdev as: xxxxx@stonestreetone.com To > > unsubscribe send a blank email to xxxxx@lists.osr.com > > > > > > > > > > > > — > Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com > To unsubscribe send a blank email to xxxxx@lists.osr.com