DiskMon source code

Dear All,

I am working on a storage disk filter driver, being a newbie I am naive of
programming. Can anybody give a sample template for this. To be more
specific I am looking for something like DiskMon. DiskMon is a utility that
captures all hard disk activity or acts like a software disk activity light
in your system tray. You may check this utility at
http://www.sysinternals.com/ntw2k/utilities.shtml

Can some body give me the source code for DiskMon OR any similiar utility
along with the source code.

Thanks in advance.

Regards,
Rohit Dhamija

(I’m duplicating my answer to a similar post on the ntdev newsgroup.)

I’m sure the guys at sysinternals would be glad to license you the
source to DiskMon for a fair price. :slight_smile: Actually, you do not want to use
DiskMon as the basis for a commercial driver. DiskMon uses a highly
unreliable and hackish technique to do what it’s doing (replacing all of
the target driver’s entry points with its own) that’s fine for a
debugging tool but not for anything else.

You need to do this properly. For W2k+, you want to write a WDM
upper-filter driver for the disk class (see Toaster sample), and for
NT4, you want to write a driver that calls IoAttachDevice* on the
storage device objects before the filesystems get a chance to attach.
Both techniques require a reboot after installation.

  • Nick Ryan

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Rohit
Sent: Sunday, June 29, 2003 6:28 AM
To: File Systems Developers
Subject: [ntfsd] DiskMon source code

Dear All,

I am working on a storage disk filter driver, being a newbie
I am naive of programming. Can anybody give a sample template
for this. To be more specific I am looking for something
like DiskMon. DiskMon is a utility that captures all hard
disk activity or acts like a software disk activity light in
your system tray. You may check this utility at
http://www.sysinternals.com/ntw2k/utilities.sh\> tml

Can some
body give me the source code for DiskMon OR
any similiar utility along with the source code.

Thanks in advance.

Regards,
Rohit Dhamija


You are currently subscribed to ntfsd as: xxxxx@nryan.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

>> source to DiskMon for a fair price.

Im sure it will be a fair one … :slight_smile:

----- Original Message -----
From: “Nick Ryan”
To: “File Systems Developers”
Sent: Saturday, June 14, 2003 9:16 PM
Subject: [ntfsd] RE: DiskMon source code

> (I’m duplicating my answer to a similar post on the ntdev newsgroup.)
>
> I’m sure the guys at sysinternals would be glad to license you the
> source to DiskMon for a fair price. :slight_smile: Actually, you do not want to use
> DiskMon as the basis for a commercial driver. DiskMon uses a highly
> unreliable and hackish technique to do what it’s doing (replacing all of
> the target driver’s entry points with its own) that’s fine for a
> debugging tool but not for anything else.
>
> You need to do this properly. For W2k+, you want to write a WDM
> upper-filter driver for the disk class (see Toaster sample), and for
> NT4, you want to write a driver that calls IoAttachDevice* on the
> storage device objects before the filesystems get a chance to attach.
> Both techniques require a reboot after installation.
>
> - Nick Ryan
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Rohit
> > Sent: Sunday, June 29, 2003 6:28 AM
> > To: File Systems Developers
> > Subject: [ntfsd] DiskMon source code
> >
> >
> > Dear All,
> >
> > I am working on a storage disk filter driver, being a newbie
> > I am naive of programming. Can anybody give a sample template
> > for this. To be more specific I am looking for something
> > like DiskMon. DiskMon is a utility that captures all hard
> > disk activity or acts like a software disk activity light in
> > your system tray. You may check this utility at
> > http://www.sysinternals.com/ntw2k/utilities.sh> tml
> >
> > Can some
> > body give me the source code for DiskMon OR
> > any similiar utility along with the source code.
> >
> > Thanks in advance.
> >
> > Regards,
> > Rohit Dhamija
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntfsd as: xxxxx@nryan.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Just to clarify something I said - when I said ‘before the filesystems
get a chance to attach’, I didn’t mean that they really attach to the
storage stack. The relationship is of course indirect through the VPB.
What really happens is that during mount the filesystem saves the
pointer to the device at the top of the storage stack at that point in
time and will always route requests to that device. That is why if your
storage filter attaches after filesystem mount it will be bypassed.

  • Nick Ryan

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Nick Ryan
Sent: Saturday, June 14, 2003 11:16 AM
To: File Systems Developers
Subject: [ntfsd] RE: DiskMon source code

(I’m duplicating my answer to a similar post on the ntdev newsgroup.)

I’m sure the guys at sysinternals would be glad to license
you the source to DiskMon for a fair price. :slight_smile: Actually, you
do not want to use DiskMon as the basis for a commercial
driver. DiskMon uses a highly unreliable and hackish
technique to do what it’s doing (replacing all of the target
driver’s entry points with its own) that’s fine for a
debugging tool but not for anything else.

You need to do this properly. For W2k+, you want to write a
WDM upper-filter driver for the disk class (see Toaster
sample), and for NT4, you want to write a driver that calls
IoAttachDevice* on the storage device objects before the
filesystems get a chance to attach. Both techniques require a
reboot after installation.

  • Nick Ryan

> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Rohit
> Sent: Sunday, June 29, 2003 6:28 AM
> To: File Systems Developers
> Subject: [ntfsd] DiskMon source code
>
>
> Dear All,
>
> I am working on a storage disk filter driver, being a newbie
> I am naive of programming. Can anybody give a sample template
> for this. To be more specific I am looking for something
> like DiskMon. DiskMon is a utility that captures all hard
> disk activity or acts like a software disk activity light in
> your system tray. You may check this utility at
> http://www.sysinternals.com/ntw2k/utilities.sh\> tml
>
> Can some
> body give me the source code for DiskMon OR
> any similiar utility along with the source code.
>
> Thanks in advance.
>
> Regards,
> Rohit Dhamija
>
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@nryan.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>


You are currently subscribed to ntfsd as: xxxxx@nryan.com
To unsubscribe send a blank email to xxxxx@lists.osr.com