sfilter & NT4

Can I modify “sfilter” sample from IFS 2003, that it work on NT4 (binary
compatible) or it easy, write a new driver with NT4 DDK (sample from Rajeev
Nagar ) ?

IFS 2003 might have some DDK API being used in the sfilter that is not
present for nt4.0, and I think, but not sure that there is an example
sfilter on the nt4.0 ifs kit. Also in the past I used the filter example of
nt4.0 from Rajeev’s book, and surely that can be used as a start…

Question:: for msdn subscriber, we could get the old ddk/sdk (the archived
ones) if we request, IS IT POSSIBLE TO GET THE OLD IFS KIT for those who get
the latest IFS KIT ?

-pro

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of unintruder
Sent: Tuesday, July 06, 2004 12:44 AM
To: Windows File Systems Devs Interest List
Subject: [Norton AntiSpam] [ntfsd] sfilter & NT4

Can I modify “sfilter” sample from IFS 2003, that it work on NT4 (binary
compatible) or it easy, write a new driver with NT4 DDK (sample from Rajeev
Nagar ) ?


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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

It is a bad idea to use older versions of SFILTER. There are some nasy
subtle bugs that have been fixed in current versions.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Prokash Sinha
Sent: Tuesday, July 06, 2004 11:03 AM
To: ntfsd redirect
Subject: RE: [ntfsd] sfilter & NT4

IFS 2003 might have some DDK API being used in the sfilter that is not
present for nt4.0, and I think, but not sure that there is an example
sfilter on the nt4.0 ifs kit. Also in the past I used the filter example
of nt4.0 from Rajeev’s book, and surely that can be used as a start…

Question:: for msdn subscriber, we could get the old ddk/sdk (the
archived
ones) if we request, IS IT POSSIBLE TO GET THE OLD IFS KIT for those who
get the latest IFS KIT ?

-pro

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of unintruder
Sent: Tuesday, July 06, 2004 12:44 AM
To: Windows File Systems Devs Interest List
Subject: [Norton AntiSpam] [ntfsd] sfilter & NT4

Can I modify “sfilter” sample from IFS 2003, that it work on NT4 (binary
compatible) or it easy, write a new driver with NT4 DDK (sample from
Rajeev Nagar ) ?


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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

Yes that is very true, and I’ve seen that even sfilter for win2k and xp are
different in places where there is no particular version dependent code… I
never tried to build any of these on a newer build environment, and tried on
a downlevel machine, and am not sure whether it would work. For example, if
we build on win2k ( that still comes with the ifs kit) and try to test on an
nt4.0. If that kind of thing works, then may be a line or two in the doc
would help all of us to avoid getting off track !

-pro

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Tony Mason
Sent: Tuesday, July 06, 2004 8:14 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] sfilter & NT4

It is a bad idea to use older versions of SFILTER. There are some nasy
subtle bugs that have been fixed in current versions.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Prokash Sinha
Sent: Tuesday, July 06, 2004 11:03 AM
To: ntfsd redirect
Subject: RE: [ntfsd] sfilter & NT4

IFS 2003 might have some DDK API being used in the sfilter that is not
present for nt4.0, and I think, but not sure that there is an example
sfilter on the nt4.0 ifs kit. Also in the past I used the filter example
of nt4.0 from Rajeev’s book, and surely that can be used as a start…

Question:: for msdn subscriber, we could get the old ddk/sdk (the
archived
ones) if we request, IS IT POSSIBLE TO GET THE OLD IFS KIT for those who
get the latest IFS KIT ?

-pro

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of unintruder
Sent: Tuesday, July 06, 2004 12:44 AM
To: Windows File Systems Devs Interest List
Subject: [Norton AntiSpam] [ntfsd] sfilter & NT4

Can I modify “sfilter” sample from IFS 2003, that it work on NT4 (binary
compatible) or it easy, write a new driver with NT4 DDK (sample from
Rajeev Nagar ) ?


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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

Tony is correct; several bugs have been fixed in the latest sfilter
examples that exist in the old NT4/W2K versions of the sfilter sample.
You should use the latest version.

The sfilter sample in the latest IFSKit is designed to build on W2K and
later. It uses the WINVER conditional to control what APIs it uses.

Thought we have never tried to build it on NT4 I don’t believe there
were a lot of API differences between W2K and NT4.

I would recommend taking the latest sfilter source and tweaking the
conditionals so they will build correctly on NT4. Note that several of
the conditionals compare (WINVER == 0x0500) which is the W2K version
number. I would recommend changing these conditionals to (WINVER <=
0x0500) and seeing how close that gets you.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tony Mason
Sent: Tuesday, July 06, 2004 8:14 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] sfilter & NT4

It is a bad idea to use older versions of SFILTER. There are some nasy
subtle bugs that have been fixed in current versions.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Prokash Sinha
Sent: Tuesday, July 06, 2004 11:03 AM
To: ntfsd redirect
Subject: RE: [ntfsd] sfilter & NT4

IFS 2003 might have some DDK API being used in the sfilter that is not
present for nt4.0, and I think, but not sure that there is an example
sfilter on the nt4.0 ifs kit. Also in the past I used the filter example
of nt4.0 from Rajeev’s book, and surely that can be used as a start…

Question:: for msdn subscriber, we could get the old ddk/sdk (the
archived
ones) if we request, IS IT POSSIBLE TO GET THE OLD IFS KIT for those who
get the latest IFS KIT ?

-pro

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of unintruder
Sent: Tuesday, July 06, 2004 12:44 AM
To: Windows File Systems Devs Interest List
Subject: [Norton AntiSpam] [ntfsd] sfilter & NT4

Can I modify “sfilter” sample from IFS 2003, that it work on NT4 (binary
compatible) or it easy, write a new driver with NT4 DDK (sample from
Rajeev Nagar ) ?


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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

Great !

Thanx Tony and Neal !

-pro

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Neal Christiansen
Sent: Tuesday, July 06, 2004 8:56 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] sfilter & NT4

Tony is correct; several bugs have been fixed in the latest sfilter
examples that exist in the old NT4/W2K versions of the sfilter sample.
You should use the latest version.

The sfilter sample in the latest IFSKit is designed to build on W2K and
later. It uses the WINVER conditional to control what APIs it uses.

Thought we have never tried to build it on NT4 I don’t believe there
were a lot of API differences between W2K and NT4.

I would recommend taking the latest sfilter source and tweaking the
conditionals so they will build correctly on NT4. Note that several of
the conditionals compare (WINVER == 0x0500) which is the W2K version
number. I would recommend changing these conditionals to (WINVER <=
0x0500) and seeing how close that gets you.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tony Mason
Sent: Tuesday, July 06, 2004 8:14 AM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] sfilter & NT4

It is a bad idea to use older versions of SFILTER. There are some nasy
subtle bugs that have been fixed in current versions.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Prokash Sinha
Sent: Tuesday, July 06, 2004 11:03 AM
To: ntfsd redirect
Subject: RE: [ntfsd] sfilter & NT4

IFS 2003 might have some DDK API being used in the sfilter that is not
present for nt4.0, and I think, but not sure that there is an example
sfilter on the nt4.0 ifs kit. Also in the past I used the filter example
of nt4.0 from Rajeev’s book, and surely that can be used as a start…

Question:: for msdn subscriber, we could get the old ddk/sdk (the
archived
ones) if we request, IS IT POSSIBLE TO GET THE OLD IFS KIT for those who
get the latest IFS KIT ?

-pro

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of unintruder
Sent: Tuesday, July 06, 2004 12:44 AM
To: Windows File Systems Devs Interest List
Subject: [Norton AntiSpam] [ntfsd] sfilter & NT4

Can I modify “sfilter” sample from IFS 2003, that it work on NT4 (binary
compatible) or it easy, write a new driver with NT4 DDK (sample from
Rajeev Nagar ) ?


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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

In Windows 2000 (and I think XP) DDK was that except_handler used on NT is not
except_handler3 import. Thus, drivers built with 2000 DDK wouldn’t run on NT. I think
this would be the case with 2003 DDK (or IFS Kit)

I would recommend taking the latest sfilter source and tweaking the
conditionals so they will build correctly on NT4. Note that several of
the conditionals compare (WINVER == 0x0500) which is the W2K version number. I
would recommend changing these conditionals to (WINVER <= 0x0500) and seeing how
close that gets you.


Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32 developers.
Alfa File Monitor - File monitoring library for Win32 developers.

> we build on win2k ( that still comes with the ifs kit) and try to test on an

nt4.0.

No, this will not work. Build using NT4 DDK/IFS to run on NT4.

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

Yes, that’s what I suspected too :). But did not try for a solid proof. And
I think it was discussed here before, perticularly Dejan’s point. Without
knowing the set of changes that goes between version, it is bit of a strong
assumption that it would work on a down-level os.

Anyway, thanks Max, Dejan, Tony, and Neal

-pro

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Maxim S. Shatskih
Sent: Tuesday, July 06, 2004 4:06 PM
To: Windows File Systems Devs Interest List
Subject: [Norton AntiSpam] Re: [ntfsd] sfilter & NT4

we build on win2k ( that still comes with the ifs kit) and try to test on
an
nt4.0.

No, this will not work. Build using NT4 DDK/IFS to run on NT4.

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


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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

So what should be the summary ?

For running under nt4.0,
a) One has to use the nt4.0 ddk/ifsk
b) Win2k or XP file filter example(s) should be used using Neal’s suggestion
(Any preference here ? )

-pro

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Prokash Sinha
Sent: Tuesday, July 06, 2004 4:17 PM
To: Windows File Systems Devs Interest List
Subject: RE: Re: [ntfsd] sfilter & NT4

Yes, that’s what I suspected too :). But did not try for a solid proof. And
I think it was discussed here before, perticularly Dejan’s point. Without
knowing the set of changes that goes between version, it is bit of a strong
assumption that it would work on a down-level os.

Anyway, thanks Max, Dejan, Tony, and Neal

-pro

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Maxim S. Shatskih
Sent: Tuesday, July 06, 2004 4:06 PM
To: Windows File Systems Devs Interest List
Subject: [Norton AntiSpam] Re: [ntfsd] sfilter & NT4

we build on win2k ( that still comes with the ifs kit) and try to test on
an
nt4.0.

No, this will not work. Build using NT4 DDK/IFS to run on NT4.

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


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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

Sorry, Neal already mentioned to take the latest ifs kit example and tweak.

-pro

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Prokash Sinha
Sent: Tuesday, July 06, 2004 4:57 PM
To: Windows File Systems Devs Interest List
Subject: RE: Re: [ntfsd] sfilter & NT4

So what should be the summary ?

For running under nt4.0,
a) One has to use the nt4.0 ddk/ifsk
b) Win2k or XP file filter example(s) should be used using Neal’s suggestion
(Any preference here ? )

-pro

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Prokash Sinha
Sent: Tuesday, July 06, 2004 4:17 PM
To: Windows File Systems Devs Interest List
Subject: RE: Re: [ntfsd] sfilter & NT4

Yes, that’s what I suspected too :). But did not try for a solid proof. And
I think it was discussed here before, perticularly Dejan’s point. Without
knowing the set of changes that goes between version, it is bit of a strong
assumption that it would work on a down-level os.

Anyway, thanks Max, Dejan, Tony, and Neal

-pro

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Maxim S. Shatskih
Sent: Tuesday, July 06, 2004 4:06 PM
To: Windows File Systems Devs Interest List
Subject: [Norton AntiSpam] Re: [ntfsd] sfilter & NT4

we build on win2k ( that still comes with the ifs kit) and try to test on
an
nt4.0.

No, this will not work. Build using NT4 DDK/IFS to run on NT4.

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


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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

> For running under nt4.0,

a) One has to use the nt4.0 ddk/ifsk
b) Win2k or XP file filter example(s) should be used using Neal’s
suggestion
(Any preference here ? )

The headers might be taken from newer IFS
kits. The only change in the headers which I know (and which you
might find important) is different return type
of ExIsResourceAcquiredSharedLite.

The worse problem is the ntoskrnl.lib. If you use
the one from IFS for 2000 (and/or newer),
your driver will not load under Windows NT,
necause it will import some symbols that are not exported
by NT kernel (e.g. __except_handler3).
So you have to use the lib(s) from NT4 DDK.

L.

As was stated earlier; you should take the sfilter source from a W2k3 or
XP IFSKit and build it using the NT4 build environment only. You should
not use a newer ntifs.h. You should then modify the sfilter sources to
accommodate the differences in the NT4 build environment.

If you are trying to build a driver that works on NT4 and later the
issue with the return type of ExIsResourceAcquiredSharedLite() being
different is not a big issue if you handle it properly. Assign the
return value to a ULONG that you have pre-initialized with zero. I just
looked at the IFSKit documentation on this API and it still shows the
return value as a USHORT. I have filed a bug to get the documentation
corrected and to have it point out the differences between the NT4 and
later versions.

Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ladislav Zezula
Sent: Wednesday, July 07, 2004 11:46 PM
To: Windows File Systems Devs Interest List
Subject: Re: Re: [ntfsd] sfilter & NT4

For running under nt4.0,
a) One has to use the nt4.0 ddk/ifsk
b) Win2k or XP file filter example(s) should be used using Neal’s
suggestion
(Any preference here ? )

The headers might be taken from newer IFS
kits. The only change in the headers which I know (and which you
might find important) is different return type
of ExIsResourceAcquiredSharedLite.

The worse problem is the ntoskrnl.lib. If you use
the one from IFS for 2000 (and/or newer),
your driver will not load under Windows NT,
necause it will import some symbols that are not exported
by NT kernel (e.g. __except_handler3).
So you have to use the lib(s) from NT4 DDK.

L.


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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