- Ramdisk user mode driver
- Posted by Tim Smith on September 3rd, 2003
Dear All:
I was hoping to create a user mode driver that simulated the ramdisk type
functionality. The virtual drive would connect to a remote database, etc.
Any suggestions on how to create a virtual disk & connect to user-mode
features - ado, etc?
TIA
tim
- Posted by John Hensley on September 3rd, 2003
It would be hard to do something like this with a virtual disk driver
because the OS needs to mount a file system on top of it. Your virtual disk
driver would need to be written as a kernel mode driver and present a
recognizable disk layout such as FAT or NTFS to the file system that mounts
on top of it.
A kernel mode virtual disk driver can get information from user mode using
an IOCTL interface so a kernel mode virtual disk driver would be able to
access information from a user mode data base if you went this route.
Most people would opt for writing a file system driver to accomplish what
you are describing because it is layout independent and allows you to
present the data as files and directories rather than a mountable volume
with a FAT or NTFS layout.
....John
"Tim Smith" <t_smith@youknowwhoooo.com> wrote in message
news:QNb5b.335981$o%2.154816@sccrnsc02...
- Posted by Tim Smith on September 4th, 2003
So where do I begin? Any suggestions? TIA
- Posted by Don Burn on September 4th, 2003
Of course you need to be sure that all the guy wants to do is access things
from the shell, if you want to be able to reference a file in a general
program this does not work. If you really want to access this stuff
generally you are going to need a file system and that is a lot of work. So
really you have a number of possibilities:
1. Shell namespace extension
This is fairly easy but does only gives you access through the
shell. Look at the samples in
MSDN and get Walter Oney's shell extension wizard
http://www.oneysoft.com/xwiz.htm
2. Remote service
Utilize the existing SMB protocol (this is what Microsoft uses to
access remote machines). You can get the source of SAMBA and modify it to
access your remote database. The problems here are:
a. You will not be able to share folders on your database system
using normal Windows
since SAMBA is going to offer shares.
b. You are forced to use the SMB protocol whether that serves you
well or not.
3. File system
This is the toughest of the approaches, you need to create a file
system driver. These are some of the toughest drivers to do in the Windows
kernel. To start this you should:
a. Buy the IFS kit from Microsoft, this is $1000 see
http://www.microsoft.com/whdc/ddk/ifskit/default.mspx
b. Take a course from OSR on how to write file systems, this is
roughly $3500 see http://www.osr.com/seminars_dfsw2_5dl.shtml
c. Consider buying the OSR File Systems Development Kit, this
is pricey (around $90000), but makes the effort much easier see
http://www.osr.com/toolkits_fsdk.shtml
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
"heinz baer" <heinz_baer@my-deja.com> wrote in message
news:5a47bd7f.0309032204.7c63147a@posting.google.c om...
- Posted by Maxim S. Shatskih on September 4th, 2003
Here at StorageCraft we have a toolkit for writing such user-mode filesystems.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
"Tim Smith" <t_smith@youknowwhoooo.com> wrote in message
news:NIw5b.345117$YN5.235308@sccrnsc01...
- Posted by Tim Smith on September 5th, 2003
Dear Don:
I agree, the shell extension, #1 is close, but if I cannot reference a path
from, say Word - it does not work. You definitely scared me away from #3,
above - however, it's more the $ than the challenge. #2 sounds like a
start, but what if I wanted to create a nfs-like client that spoke to a
special IP server that would than retrieve files from a db or the like? I
did read about kernel level sockets. Am I getting warmer? I checked out
OSR's site last week - I have been trying to study-up on the pre-reqs for
their classes...could you recommend some reading material - books
specifically? TIA.
Tim
- Posted by Don Burn on September 5th, 2003
Tim,
As soon as you are going into the kernel you are in the world of
filesystems (a redirector for NFS is a file system). I would try to find a
supported public protocol such as SMB or NFS and make your remote user space
support handle that protocol to your database.
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
"Tim Smith" <t_smith@youknowwhoooo.com> wrote in message
news:CNQ5b.354974$Ho3.52386@sccrnsc03...