Minifilter Driver: How to use FltCreateFile in CSVFS?

Category: windows hardware wdk and driver development


noblesys on Mon, 03 Sep 2018 01:40:01

I'm Filefilter Driver developer.

I have A problem, about developing CSVFS FileSystem.

developing code,

rc = FltCreateFile(FltObjects->Filter, FltObjects->Instance, &ntfile, FILE_ALL_ACCESS, &objattr, &iostatus, (PLARGE_INTEGER)NULL, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN,

rc = ZwQueryVolumeInformationFile(ntfile, &iostatus, &buffer, size, FileFsAttributeInformation);
if(NT_SUCCESS(rc)) {


  if(NULL != attrinfo && NULL != attrinfo && !_wcsnicmp(attrinfo->FileSystemName, L"csvfs", 5)) {

FltCreateFile() Function Here, BSOD occurs.

I want to get attrinfo-> FileSystemName in CSVFS.

Please how to get FileSystem attribute to any file with CSVFS?

If know FltCreateFile() replace Function, Please let me know.


Don Burn [Windrvr] on Mon, 03 Sep 2018 12:30:44

First for BSOD's in general take a crash dump and post the !analyze -v from Windbg on the forum, that is the best way to give people data.   Second thing here is that the code you have shows the FltCreateFile, but none of the setup code for things like, the ObjectAttibutes.   A crash in FltCreateFile is going to happen because you did not set the parameters correctly or your environment is incorrect, so we need to know about the code that is issuing the call.

Some general observations, first why are you trying to do this code in the first place?   Also, why aren't you using FltQueryVolumeInformation as a mini-filter should?

noblesys on Thu, 13 Sep 2018 06:37:32

My Thanks, then

How to use the Function about FltQueryVolumeInformation, example or Sample?