سؤال

Possible Duplicate:
C#: Create a virtual drive in Computer

My aim is to create a fake virtual drive to share on the network. The purpose of this fake drive is simply to receive files transferred to it through the network, and then discard them all immediately (not interested in ever having them touch any solid disk drive).

The reason I need this is to simulate a recording server receiving video feed from hundreds of cameras, without actually having to store the data. Storing the data would require a heavy RAID-0 setup which I don't have plans on getting. I simply need to measure the system load on Machine A when sending the video over the network to Machine B. The fake virtual drive would be installed on Machine B and then shared on the network to be accessible by Machine A.

So, in short I need to:

  1. Create a drive letter, which by Windows will seem like any other drive.
  2. Manage the I/O on this "drive", perhaps by overriding a method or two, to simply skip the part where I'd normally be saving the data.

The important part is that Machine A (the machine sending the files) is unaffected by Machine B not being a real shared storage device.

Thanks in advance for any feedback.

هل كانت مفيدة؟

المحلول

I have seen this done with a Windows file system driver written in C. It does what you are looking for, i.e. behaves just like a physical hard drive but development is not for the faint of heart.

The driver is capable of doing whatever you want in response to operating system messages. For example, a "write" could persist to a database, increment a counter in memory, or do nothing at all.

Here is a third party SDK I found: http://www.eldos.com/cbfs/index.php?referer1=google&referer2=adwords_cbfs_gen&gclid=CO7Tnbm086wCFRBphwodjQ_XOQ

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top