FltEnumerateVolumes?

Hello Folks:

In my filter driver, I would like to attach to volumes that corresponds to USBs. I am calling
FltEnumerateVolumes() to tell me about all volumes, then call FltGetDiskDeviceObject() on
each volume that has been enumerated. However, there is no way I can advance the array
pointer filled by FltEnumerateVolumes() as the size of _FLT_VOLUME structure is not known.

Am I missing something here?

As a workaround, I am thinking of using FltEnumerateVolumeInformation() then call
FltGetVolumeFromName() which will give me PFLT_VOLUME and then finally call FltGetDiskDeviceObject()

Am I on the right path?

Please help.

We’ve moved from a basic Windows kernel mode question to a basic C
programming question. You’re regressing.

FltEnumerateVolumes returns an array of opaque pointers to FLT_VOLUME
structures. The size of a pointer is very well known.

  • Dan.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Tuesday, August 22, 2006 5:58 PM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] FltEnumerateVolumes?

Hello Folks:

In my filter driver, I would like to attach to volumes that corresponds to
USBs. I am calling
FltEnumerateVolumes() to tell me about all volumes, then call
FltGetDiskDeviceObject() on
each volume that has been enumerated. However, there is no way I can advance
the array
pointer filled by FltEnumerateVolumes() as the size of _FLT_VOLUME structure
is not known.

Am I missing something here?

As a workaround, I am thinking of using FltEnumerateVolumeInformation() then
call
FltGetVolumeFromName() which will give me PFLT_VOLUME and then finally call
FltGetDiskDeviceObject()

Am I on the right path?

Please help.


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@privtek.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

You are right. Sorry, I didn’t mean to annoy anybody with my question, however, my basic
assumption was that I have to pass a pointer to an array to FltEnumerateVolumes() where each element in the array is FLT_VOLUME and not PFLT_VOLUME and hence I was trying to advance the
pointer to get to the next FLT_VOLUME, but it wasn’t compiling as size of FLT_VOLUME (or struct
_FLT_VOLUME) is not known.
Your answer opened my eyes to see the difference between an array of pointers rather than array of structures.

Thank you so much.