// JP opened flex table

Click to See Complete Forum and Search --> : Troble with virtual drive.


s.connery
January 23rd, 2005, 12:03 AM
Hello,

I am new to driver development and I will apreciate if you could help me with my small project.

I am rebuilding ramdisk from known microsoft sample and my interest here is to get file/directory name which is send or requested by the system and process those files by redirecting buffer to another location, but showing those file names on a virtual drive as it was actualy copied on it.

I found a function RamDiskReadWrite within MS Ramdisk sample which is DispatchRead and DispatchReadWrite routine, but it reads and writes on very low level like it showen below:
_________________________________________

PIO_STACK_LOCATION irpStack;
PDEVICE_EXTENSION devExt;
...
devExt->DiskImage + irpStack->Parameters.Read.ByteOffset.LowPart
_________________________________________


Is it corrent to get file/directory names in example above like this:
<b> irpStack->FileObject ......</b>
if it so could you please extend little bit this code for me.

And the last question, when I want to read from virtual drive how can I pass buffer from CRT function <b>fread</b> to the system or is there any other solution for this?


Thank you very much in advance.

And-or
January 24th, 2005, 06:34 AM
1. The driver automatically receives the content of the buffer you pass to fread routine as first parameter.

2. The name of the file that is passed is in the FileObject, but only in IRP_MJ_CREATE dispatch handler, so you will not read it here.


And-or

//JP added flex table