I'm very new to device drivers. I might not be in the right place.
I would like to write a file system driver, preferrably in managed code
(C# or managed C++). According to
http://www.microsoft.com/whdc/driver/foundation/DrvDev_Intro.mspx#
I need to obtain the Installable File System Kit
(http://www.microsoft.com/whdc/devtools/ifskit/ServerIFSKitOrderinfo.mspx).

Some questions:

1) Is this the way to write a "client-side file system redirector"? I want
to expose a
network service as a file system to WXP. Is the User-Mode Driver
Framework
a better (simplier) way to do this?

2) What are some good titles to learn how to do this? Russinovich?

Pl. advise. Thanks.

Re: newbie asks orienting questions about file system drivers by Maxim

Maxim
Thu Sep 14 02:03:38 CDT 2006

> I would like to write a file system driver, preferrably in managed code
> (C# or managed C++).

Forget it. Managed code is not supported in the kernel.

> 1) Is this the way to write a "client-side file system redirector"? I want

Yes, but this is one of the hardest kinds of the projects in kernel-mode
programming. Start with reading RDBSS and the mini-redirector source from the
IFS Kit. If you will be able to comprehend it - then good. If not - then start
with the basics, like the DDK documentation and samples, and the Rajeev Nagar's
book on file systems.

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


Re: newbie asks orienting questions about file system drivers by Don

Don
Thu Sep 14 07:08:10 CDT 2006

As Max has already stated you are taking on one of the hardest projects in
the kernel as your first effort. Now some things to help:

1. Get the WDK beta (this is the new DDK for Vista) it includes the IFS kit
for free.

2. Go to http://www.osronline.com and join the NTFSD newsgroup, this is
where the file system people hang out.

3. Assuming you are a sharp developer, set aside the next two to three
years to get this project running to a professional level. Sorry but you
are diving into the deepend.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply



"hidden" <hidden123456@yahool.com> wrote in message
news:OKWpSg51GHA.4748@TK2MSFTNGP04.phx.gbl...
> I'm very new to device drivers. I might not be in the right place.
> I would like to write a file system driver, preferrably in managed code
> (C# or managed C++). According to
> http://www.microsoft.com/whdc/driver/foundation/DrvDev_Intro.mspx#
> I need to obtain the Installable File System Kit
> (http://www.microsoft.com/whdc/devtools/ifskit/ServerIFSKitOrderinfo.mspx).
>
> Some questions:
>
> 1) Is this the way to write a "client-side file system redirector"? I want
> to expose a
> network service as a file system to WXP. Is the User-Mode Driver
> Framework
> a better (simplier) way to do this?
>
> 2) What are some good titles to learn how to do this? Russinovich?
>
> Pl. advise. Thanks.
>



Re: newbie asks orienting questions about file system drivers by hidden

hidden
Thu Sep 14 08:42:55 CDT 2006


"Don Burn" <burn@stopspam.acm.org> wrote in message
news:%236SICa$1GHA.3464@TK2MSFTNGP03.phx.gbl...
> As Max has already stated you are taking on one of the hardest projects in
> the kernel as your first effort. Now some things to help:
>
> 1. Get the WDK beta (this is the new DDK for Vista) it includes the IFS
> kit for free.
>
> 2. Go to http://www.osronline.com and join the NTFSD newsgroup, this is
> where the file system people hang out.
>
> 3. Assuming you are a sharp developer, set aside the next two to three
> years to get this project running to a professional level. Sorry but you
> are diving into the deepend.
>

Okay, so I'm *really* a (now embarrassed) newb. But this was helpful.

Let me try a follow on question. My eventual goal is to expose a network
service on a remote machine as a kind of file system. An example might be
say NFS, from Windows (client) to Solaris (server). Yes, I understand there
are products to do this, including Microsoft's Unix services thing. So
another
example might be exposing a table in a database as a read-only file. Short
of
kernel-mode hacking, is there a simplier way to do this? One that doesn't
have
such a substantial learning curve?

In the Unix/Linux/BSD word, I think this is a called a "user-mode file
system".
Is there an equivalent Windows concept? Named differently? Pl. advise.

Also, is there a faq for this newsgroup? Then I waste less of your time. Tx.




Re: newbie asks orienting questions about file system drivers by Don

Don
Thu Sep 14 09:06:02 CDT 2006

No there is no equivalent, there was once a commercial product that tried to
do this, but it is no longer available, and I have never found anyone who
used it. Bottom line is if you want it to look really like a file system,
you are looking at a ton of work.

Now, if you can live with something that is less than a full filesystem, for
instance no directory commands, but the ability to open things by a name,
you might look at a device namespace. This will not allow you to do NFS or
the like, but it can allow you to support things like opening:

\\..\\newb_dev\\DataBaseTable

where newb_dev is the device you created, and DataBaseTable is the name of
the "file" you want. If you restrict this enough, then I believe UMDF will
work. But once you go beyond a certain point (i.e. things like querying a
directory) this is not going to work with KMDF, and you are back to a file
system.

There is no FAQ for this list, but again at http:\\www.osronline.com there
is a FAQ for filesystems.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply



"hidden" <hidden123456@yahool.com> wrote in message
news:uGKZeVA2GHA.4484@TK2MSFTNGP02.phx.gbl...
>
> "Don Burn" <burn@stopspam.acm.org> wrote in message
> news:%236SICa$1GHA.3464@TK2MSFTNGP03.phx.gbl...
>> As Max has already stated you are taking on one of the hardest projects
>> in the kernel as your first effort. Now some things to help:
>>
>> 1. Get the WDK beta (this is the new DDK for Vista) it includes the IFS
>> kit for free.
>>
>> 2. Go to http://www.osronline.com and join the NTFSD newsgroup, this is
>> where the file system people hang out.
>>
>> 3. Assuming you are a sharp developer, set aside the next two to three
>> years to get this project running to a professional level. Sorry but you
>> are diving into the deepend.
>>
>
> Okay, so I'm *really* a (now embarrassed) newb. But this was helpful.
>
> Let me try a follow on question. My eventual goal is to expose a network
> service on a remote machine as a kind of file system. An example might be
> say NFS, from Windows (client) to Solaris (server). Yes, I understand
> there
> are products to do this, including Microsoft's Unix services thing. So
> another
> example might be exposing a table in a database as a read-only file. Short
> of
> kernel-mode hacking, is there a simplier way to do this? One that doesn't
> have
> such a substantial learning curve?
>
> In the Unix/Linux/BSD word, I think this is a called a "user-mode file
> system".
> Is there an equivalent Windows concept? Named differently? Pl. advise.
>
> Also, is there a faq for this newsgroup? Then I waste less of your time.
> Tx.
>
>
>



Re: newbie asks orienting questions about file system drivers by hidden

hidden
Thu Sep 14 10:57:20 CDT 2006

"Don Burn" <burn@stopspam.acm.org> wrote in message
news:%23dpB6bA2GHA.4976@TK2MSFTNGP02.phx.gbl...
> No there is no equivalent, there was once a commercial product that tried
> to do this, but it is no longer available, and I have never found anyone
> who used it. Bottom line is if you want it to look really like a file
> system, you are looking at a ton of work.
>

Thanks, Don. Just out of curiousity, do you happen to know the name of
the product? Any reason it failed? My intuition is that something like this
would be valuable if it generalized sufficiently. I'm missing something?



Re: newbie asks orienting questions about file system drivers by Don

Don
Thu Sep 14 11:18:39 CDT 2006

I can't remember the name, but the product was from StorageCraft. It may
not have failed for technical reasons, but because of the change in
ownership of the company. Maxim Shatskih a fellow MVP who posts on this
list is one of the lead developers there, he may be able to provide more
information.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply



"hidden" <hidden123456@yahool.com> wrote in message
news:OUfcwgB2GHA.2196@TK2MSFTNGP06.phx.gbl...
> "Don Burn" <burn@stopspam.acm.org> wrote in message
> news:%23dpB6bA2GHA.4976@TK2MSFTNGP02.phx.gbl...
>> No there is no equivalent, there was once a commercial product that tried
>> to do this, but it is no longer available, and I have never found anyone
>> who used it. Bottom line is if you want it to look really like a file
>> system, you are looking at a ton of work.
>>
>
> Thanks, Don. Just out of curiousity, do you happen to know the name of
> the product? Any reason it failed? My intuition is that something like
> this
> would be valuable if it generalized sufficiently. I'm missing something?
>
>



Re: newbie asks orienting questions about file system drivers by cristalink

cristalink
Thu Sep 14 15:16:08 CDT 2006

If you want c#, write a .net web service exposing your DB table. Then write
a client app that uses the web service and creates a folder with files in
Explorer's namespace. A few days should be enough to have something working.

--
http://www.cristalink.com


"hidden" <hidden123456@yahool.com> wrote in message
news:OKWpSg51GHA.4748@TK2MSFTNGP04.phx.gbl...
> I'm very new to device drivers. I might not be in the right place.
> I would like to write a file system driver, preferrably in managed code
> (C# or managed C++). According to
> http://www.microsoft.com/whdc/driver/foundation/DrvDev_Intro.mspx#
> I need to obtain the Installable File System Kit
> (http://www.microsoft.com/whdc/devtools/ifskit/ServerIFSKitOrderinfo.mspx).
>
> Some questions:
>
> 1) Is this the way to write a "client-side file system redirector"? I want
> to expose a
> network service as a file system to WXP. Is the User-Mode Driver
> Framework
> a better (simplier) way to do this?
>
> 2) What are some good titles to learn how to do this? Russinovich?
>
> Pl. advise. Thanks.
>



Re: newbie asks orienting questions about file system drivers by Dev

Dev
Tue Nov 14 14:33:02 CST 2006

Don,

Would you explain a bit more details in this?

> \\..\\newb_dev\\DataBaseTable

I do not really understand.

Thanks.



"Don Burn" wrote:

> No there is no equivalent, there was once a commercial product that tried to
> do this, but it is no longer available, and I have never found anyone who
> used it. Bottom line is if you want it to look really like a file system,
> you are looking at a ton of work.
>
> Now, if you can live with something that is less than a full filesystem, for
> instance no directory commands, but the ability to open things by a name,
> you might look at a device namespace. This will not allow you to do NFS or
> the like, but it can allow you to support things like opening:
>
> \\..\\newb_dev\\DataBaseTable
>
> where newb_dev is the device you created, and DataBaseTable is the name of
> the "file" you want. If you restrict this enough, then I believe UMDF will
> work. But once you go beyond a certain point (i.e. things like querying a
> directory) this is not going to work with KMDF, and you are back to a file
> system.


Re: newbie asks orienting questions about file system drivers by Don

Don
Tue Nov 14 14:41:26 CST 2006

Basically, any driver can have a namespace (see
http://www.microsoft.com/whdc/driver/tips/DevNamespace.mspx) this means you
can open items in a driver with a specific name, and then do read / write /
device IO cotnrols on these. It is not a full file system, but it does
mean you can have a number of things your device can address each one with
a name.

--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply




"Dev" <Dev@discussions.microsoft.com> wrote in message
news:04B199D0-A1B2-43DC-B30A-856BD18F04C8@microsoft.com...
> Don,
>
> Would you explain a bit more details in this?
>
>> \\..\\newb_dev\\DataBaseTable
>
> I do not really understand.
>
> Thanks.
>
>
>
> "Don Burn" wrote:
>
>> No there is no equivalent, there was once a commercial product that
>> tried to
>> do this, but it is no longer available, and I have never found anyone
>> who
>> used it. Bottom line is if you want it to look really like a file
>> system,
>> you are looking at a ton of work.
>>
>> Now, if you can live with something that is less than a full filesystem,
>> for
>> instance no directory commands, but the ability to open things by a
>> name,
>> you might look at a device namespace. This will not allow you to do NFS
>> or
>> the like, but it can allow you to support things like opening:
>>
>> \\..\\newb_dev\\DataBaseTable
>>
>> where newb_dev is the device you created, and DataBaseTable is the name
>> of
>> the "file" you want. If you restrict this enough, then I believe UMDF
>> will
>> work. But once you go beyond a certain point (i.e. things like querying
>> a
>> directory) this is not going to work with KMDF, and you are back to a
>> file
>> system.
>



Re: newbie asks orienting questions about file system drivers by Dev

Dev
Tue Nov 14 15:04:02 CST 2006

Thanks for the quick reply.

In this sense, do you think if it is possible to do something like this:

\\.\\vdisk\root - the driver returns a copy of the root directory of the vfs
\\.\\vdisk\root\dir1 - the driver returns a copy of the subdirectory dir1
off root
\\.\\vdisk\root\dir1\file.txt - the driver returns the content of file.txt
and etc

Of course, the calling program will need to implement a file system like
layer of top of this to make it feel like a FS.

Will this be possible? In UMDF?

Thanks



"Don Burn" wrote:

> Basically, any driver can have a namespace (see
> http://www.microsoft.com/whdc/driver/tips/DevNamespace.mspx) this means you
> can open items in a driver with a specific name, and then do read / write /
> device IO cotnrols on these. It is not a full file system, but it does
> mean you can have a number of things your device can address each one with
> a name.
>
> --
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> http://www.windrvr.com
> Remove StopSpam from the email to reply
>
>
>
>
> "Dev" <Dev@discussions.microsoft.com> wrote in message
> news:04B199D0-A1B2-43DC-B30A-856BD18F04C8@microsoft.com...
> > Don,
> >
> > Would you explain a bit more details in this?
> >
> >> \\..\\newb_dev\\DataBaseTable
> >
> > I do not really understand.
> >
> > Thanks.
> >
> >
> >
> > "Don Burn" wrote:
> >
> >> No there is no equivalent, there was once a commercial product that
> >> tried to
> >> do this, but it is no longer available, and I have never found anyone
> >> who
> >> used it. Bottom line is if you want it to look really like a file
> >> system,
> >> you are looking at a ton of work.
> >>
> >> Now, if you can live with something that is less than a full filesystem,
> >> for
> >> instance no directory commands, but the ability to open things by a
> >> name,
> >> you might look at a device namespace. This will not allow you to do NFS
> >> or
> >> the like, but it can allow you to support things like opening:
> >>
> >> \\..\\newb_dev\\DataBaseTable
> >>
> >> where newb_dev is the device you created, and DataBaseTable is the name
> >> of
> >> the "file" you want. If you restrict this enough, then I believe UMDF
> >> will
> >> work. But once you go beyond a certain point (i.e. things like querying
> >> a
> >> directory) this is not going to work with KMDF, and you are back to a
> >> file
> >> system.
> >
>
>
>

Re: newbie asks orienting questions about file system drivers by Don

Don
Tue Nov 14 15:21:06 CST 2006

I believe you can do this, you can use IWDFFile::RetrieveFileName in a
CreateFile callback to get the full path for the create. You can set up a
context per fileobject to track what the file is you are dealing with for
Read / Write / and DeviceIoControl.

You won't have things like current directory, file attributes, etc.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply



"Dev" <Dev@discussions.microsoft.com> wrote in message
news:07BE7943-E7DB-4EAA-9208-FAD59BD21D15@microsoft.com...
> Thanks for the quick reply.
>
> In this sense, do you think if it is possible to do something like this:
>
> \\.\\vdisk\root - the driver returns a copy of the root directory of the
> vfs
> \\.\\vdisk\root\dir1 - the driver returns a copy of the subdirectory dir1
> off root
> \\.\\vdisk\root\dir1\file.txt - the driver returns the content of
> file.txt
> and etc
>
> Of course, the calling program will need to implement a file system like
> layer of top of this to make it feel like a FS.
>
> Will this be possible? In UMDF?
>
> Thanks
>
>
>
> "Don Burn" wrote:
>
>> Basically, any driver can have a namespace (see
>> http://www.microsoft.com/whdc/driver/tips/DevNamespace.mspx) this means
>> you
>> can open items in a driver with a specific name, and then do read /
>> write /
>> device IO cotnrols on these. It is not a full file system, but it does
>> mean you can have a number of things your device can address each one
>> with
>> a name.
>>
>> --
>> Don Burn (MVP, Windows DDK)
>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> http://www.windrvr.com
>> Remove StopSpam from the email to reply
>>
>>
>>
>>
>> "Dev" <Dev@discussions.microsoft.com> wrote in message
>> news:04B199D0-A1B2-43DC-B30A-856BD18F04C8@microsoft.com...
>> > Don,
>> >
>> > Would you explain a bit more details in this?
>> >
>> >> \\..\\newb_dev\\DataBaseTable
>> >
>> > I do not really understand.
>> >
>> > Thanks.
>> >
>> >
>> >
>> > "Don Burn" wrote:
>> >
>> >> No there is no equivalent, there was once a commercial product that
>> >> tried to
>> >> do this, but it is no longer available, and I have never found anyone
>> >> who
>> >> used it. Bottom line is if you want it to look really like a file
>> >> system,
>> >> you are looking at a ton of work.
>> >>
>> >> Now, if you can live with something that is less than a full
>> >> filesystem,
>> >> for
>> >> instance no directory commands, but the ability to open things by a
>> >> name,
>> >> you might look at a device namespace. This will not allow you to do
>> >> NFS
>> >> or
>> >> the like, but it can allow you to support things like opening:
>> >>
>> >> \\..\\newb_dev\\DataBaseTable
>> >>
>> >> where newb_dev is the device you created, and DataBaseTable is the
>> >> name
>> >> of
>> >> the "file" you want. If you restrict this enough, then I believe
>> >> UMDF
>> >> will
>> >> work. But once you go beyond a certain point (i.e. things like
>> >> querying
>> >> a
>> >> directory) this is not going to work with KMDF, and you are back to a
>> >> file
>> >> system.
>> >
>>
>>
>>