detect hot swap hard disk for laptop

Hi,

Currently I am using a IBM laptop which has an ultrabay hotswappable hard
disk.
I am using a sfilter as a skeleton for my file filter.
A strange thing I discover is that when I plug in the hot swap hard disk,
the deviceobject->characteristics is not 0x001 but 0x100.
Same as a normal fixed IDE hard disk.
Maybe I should not look at the deviceobject characterisitics.
So I tried sending IOCTL_STORAGE_GET_HOTPLUG_INFO, and I got 0 for
MediaRemovable, MediaHotplug, and DeviceHotplug.
I thought for hot swap hard disk, the DeviceHotplug should be 1.
But I guessed I am wrong.

So how do I differentiate a hot swap hard disk from a fixed hard disk from
sfilter point of view?
Is there a way to know that it is a removable hard disk?
since the OS knows it, if not I will not be able to go to the PnP manager in
the taskbar to stop the device and remove it on the fly.

Hope someone can help.

Thank You!

cheers,
vincent


Download Norah Jones, Eminem and more! http://www.msn.com.sg/ringtones/

Hi,

Whats the the purpose of vpb->serialnumber?
I notice that for fixed hard disk the serialnumber is 0xfffffff
while removable hard disk it is 0x0
is that always true?
who set this serial number?

thank you

cheers,
vincent

From: “vincent gambit”
>Reply-To: “File Systems Developers”
>To: “File Systems Developers”
>Subject: [ntfsd] detect hot swap hard disk for laptop
>Date: Tue, 12 Aug 2003 11:29:54 +0800
>
>Hi,
>
>Currently I am using a IBM laptop which has an ultrabay hotswappable hard
>disk.
>I am using a sfilter as a skeleton for my file filter.
>A strange thing I discover is that when I plug in the hot swap hard disk,
>the deviceobject->characteristics is not 0x001 but 0x100.
>Same as a normal fixed IDE hard disk.
>Maybe I should not look at the deviceobject characterisitics.
>So I tried sending IOCTL_STORAGE_GET_HOTPLUG_INFO, and I got 0 for
>MediaRemovable, MediaHotplug, and DeviceHotplug.
>I thought for hot swap hard disk, the DeviceHotplug should be 1.
>But I guessed I am wrong.
>
>So how do I differentiate a hot swap hard disk from a fixed hard disk from
>sfilter point of view?
>Is there a way to know that it is a removable hard disk?
>since the OS knows it, if not I will not be able to go to the PnP manager
>in the taskbar to stop the device and remove it on the fly.
>
>Hope someone can help.
>
>Thank You!
>
>cheers,
>vincent
>
>
>Download Norah Jones, Eminem and more! http://www.msn.com.sg/ringtones/
>
>
>
>—
>You are currently subscribed to ntfsd as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com


Send a fun phone greeting to your friend!
http://www.msn.com.sg/mobile/fungreetings/

vpb->serialnumber is assigned by file system driver when file system is
mounted on the device.
If the device is not formatted then Raw file sytem is mounted on it and sets
serial number in the Vpb to 0xfffffff.

Alexei.

“vincent gambit” wrote in message
news:xxxxx@ntfsd…
>
> Hi,
>
> Whats the the purpose of vpb->serialnumber?
> I notice that for fixed hard disk the serialnumber is 0xfffffff
> while removable hard disk it is 0x0
> is that always true?
> who set this serial number?
>
> thank you
>
> cheers,
> vincent
>
>
> >From: “vincent gambit”
> >Reply-To: “File Systems Developers”
> >To: “File Systems Developers”
> >Subject: [ntfsd] detect hot swap hard disk for laptop
> >Date: Tue, 12 Aug 2003 11:29:54 +0800
> >
> >Hi,
> >
> >Currently I am using a IBM laptop which has an ultrabay hotswappable hard
> >disk.
> >I am using a sfilter as a skeleton for my file filter.
> >A strange thing I discover is that when I plug in the hot swap hard disk,
> >the deviceobject->characteristics is not 0x001 but 0x100.
> >Same as a normal fixed IDE hard disk.
> >Maybe I should not look at the deviceobject characterisitics.
> >So I tried sending IOCTL_STORAGE_GET_HOTPLUG_INFO, and I got 0 for
> >MediaRemovable, MediaHotplug, and DeviceHotplug.
> >I thought for hot swap hard disk, the DeviceHotplug should be 1.
> >But I guessed I am wrong.
> >
> >So how do I differentiate a hot swap hard disk from a fixed hard disk
from
> >sfilter point of view?
> >Is there a way to know that it is a removable hard disk?
> >since the OS knows it, if not I will not be able to go to the PnP manager
> >in the taskbar to stop the device and remove it on the fly.
> >
> >Hope someone can help.
> >
> >Thank You!
> >
> >cheers,
> >vincent
> >
> >
> >Download Norah Jones, Eminem and more! http://www.msn.com.sg/ringtones/
> >
> >
> >
> >—
> >You are currently subscribed to ntfsd as: xxxxx@hotmail.com
> >To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

> Send a fun phone greeting to your friend!
> http://www.msn.com.sg/mobile/fungreetings/
>
>
>
>

Vpb->SerialNumber is the volume serial number, it is set by the FSD based on
boot sector data. Its purpose is to help the media change detection mechanism -
to remount the old volume when the old media is re-inserted.

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

Hi

thanks for your reply

so is it possible to identify the hot swap hard disk used in laptop and a
fixed hard disk (IDE)?

thank You!

cheers,
vincent

From: “Maxim S. Shatskih”
>Reply-To: “File Systems Developers”
>To: “File Systems Developers”
>Subject: [ntfsd] Re: detect hot swap hard disk for laptop
>Date: Tue, 12 Aug 2003 11:53:21 +0400
>
>Vpb->SerialNumber is the volume serial number, it is set by the FSD based
>on
>boot sector data. Its purpose is to help the media change detection
>mechanism -
>to remount the old volume when the old media is re-inserted.
>
>Maxim Shatskih, Windows DDK MVP
>StorageCraft Corporation
>xxxxx@storagecraft.com
>http://www.storagecraft.com
>
>
>
>—
>You are currently subscribed to ntfsd as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com

_________________________________________________________________
Send a fun phone greeting to your friend!
http://www.msn.com.sg/mobile/fungreetings/