Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Purge tampon fat memory on a device (eg. \\device\deviceimg)

Reply
Thread Tools Display Modes

Purge tampon fat memory on a device (eg. \\device\deviceimg)

 
 
Mathieu
Guest
Posts: n/a

 
      10-29-2009

Hello, I developed a driver to mount a logical drive on an image file (.
RAW). It works perfect! By cons when I unmount the logical drive and
remount the logical drive pointing to another image file (. RAW) windows
keep the old file because some filenames and the FAT are buffered. When
i unmount the logical Drive I do not use IoDeleteDevice by cons I delete
the symlink \\.\X: with api iodeletesymboliclink, and use
DefineDosDevice for removing the logicial drive mapped to
\\device\DeviceImg. When I unmount i inactivate the device with a only
flag remember. When the device is unmounted I return a NTSTATUS error
code such STATUS_MEDIA_REMOVED , not work if used.

{
KdPrintferror(("[VDUM] IOCTL not used index %d.\n",index));
status=STATUS_DEVICE_REMOVED;
irp->IoStatus.Status=status;
irp->IoStatus.Information = 0; goto fin; } else { } .. ..
irp->IoStatus.Status = status;
if (status!=STATUS_PENDING)
IoCompleteRequest(irp, IO_NO_INCREMENT);

Conclusion: How to ask windows to purge the buffer that stores the names
of files on disk \\device\DeviceImg with out call IoDeleteDevice?? Thank
you very much.


My wish: when I dismounted and went up the logical drive to another
image file (. RAW) I want to empty the buffer storing the FAT
directories and file names, so I can see my files stored in another
image file . Thank you
 
Reply With Quote
 
 
 
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      10-29-2009
You must fully implement "check verify" and all related removable media handling in your vdisk - DO_VERIFY_VOLUME and so on.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

"Mathieu" <> wrote in message news:4ae8df9c$0$894$...
>
> Hello, I developed a driver to mount a logical drive on an image file (.
> RAW). It works perfect! By cons when I unmount the logical drive and
> remount the logical drive pointing to another image file (. RAW) windows
> keep the old file because some filenames and the FAT are buffered. When
> i unmount the logical Drive I do not use IoDeleteDevice by cons I delete
> the symlink \\.\X: with api iodeletesymboliclink, and use
> DefineDosDevice for removing the logicial drive mapped to
> \\device\DeviceImg. When I unmount i inactivate the device with a only
> flag remember. When the device is unmounted I return a NTSTATUS error
> code such STATUS_MEDIA_REMOVED , not work if used.
>
> {
> KdPrintferror(("[VDUM] IOCTL not used index %d.\n",index));
> status=STATUS_DEVICE_REMOVED;
> irp->IoStatus.Status=status;
> irp->IoStatus.Information = 0; goto fin; } else { } .. ..
> irp->IoStatus.Status = status;
> if (status!=STATUS_PENDING)
> IoCompleteRequest(irp, IO_NO_INCREMENT);
>
> Conclusion: How to ask windows to purge the buffer that stores the names
> of files on disk \\device\DeviceImg with out call IoDeleteDevice?? Thank
> you very much.
>
>
> My wish: when I dismounted and went up the logical drive to another
> image file (. RAW) I want to empty the buffer storing the FAT
> directories and file names, so I can see my files stored in another
> image file . Thank you

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Game Compatibility BCurrey Windows Vista Games 6 11-29-2007 09:11 PM
My PnP Monitor is seen as Non PnP??? Colin Windows Vista Hardware 1 11-29-2007 06:01 PM
Going Golfing but not with Vista markbyrn Windows Vista Games 15 03-08-2007 11:59 AM
americas army stuttering under vista premium ernie Windows Vista Games 0 02-27-2007 11:20 PM
problem in dxdiag Peewee64 Windows Vista Games 0 02-14-2007 10:49 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59