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()
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()
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.