0
votes

I started programming a mini-filter in VS2012, Win8. After creating a new project Filter Driver: Filesystem Mini-filter i am getting 6 errors.

7 IntelliSense: argument of type "void (*)(PCFLT_RELATED_OBJECTS FltObjects, PFLT_IO_PARAMETER_BLOCK ParameterSnapshot, NTSTATUS OperationStatus, PVOID RequesterContext)" is incompatible with parameter of type "PFLT_GET_OPERATION_STATUS_CALLBACK"

5 IntelliSense: a value of type "void (*)(PCFLT_RELATED_OBJECTS FltObjects, FLT_INSTANCE_TEARDOWN_FLAGS Flags)" cannot be used to initialize an entity of type "PFLT_INSTANCE_TEARDOWN_CALLBACK"

6 IntelliSense: a value of type "void (*)(PCFLT_RELATED_OBJECTS FltObjects, FLT_INSTANCE_TEARDOWN_FLAGS Flags)" cannot be used to initialize an entity of type "PFLT_INSTANCE_TEARDOWN_CALLBACK"

3 IntelliSense: a value of type "NTSTATUS (*)(PCFLT_RELATED_OBJECTS FltObjects, FLT_INSTANCE_SETUP_FLAGS Flags, ULONG VolumeDeviceType, FLT_FILESYSTEM_TYPE VolumeFilesystemType)" cannot be used to initialize an entity of type "PFLT_INSTANCE_SETUP_CALLBACK"

4 IntelliSense: a value of type "NTSTATUS (*)(PCFLT_RELATED_OBJECTS FltObjects, FLT_INSTANCE_QUERY_TEARDOWN_FLAGS Flags)" cannot be used to initialize an entity of type "PFLT_INSTANCE_QUERY_TEARDOWN_CALLBACK

2 IntelliSense: a value of type "NTSTATUS (*)(FLT_FILTER_UNLOAD_FLAGS Flags)" cannot be used to initialize an entity of type "PFLT_FILTER_UNLOAD_CALLBACK"

Main function where most of the errors are

CONST FLT_REGISTRATION FilterRegistration = {
    sizeof( FLT_REGISTRATION ),         //  Size
    FLT_REGISTRATION_VERSION,           //  Version
    0,                                  //  Flags
    NULL,                               //  Context
    Callbacks,                          //  Operation callbacks
    FsFilter1testUnload,                           //  MiniFilterUnload
    FsFilter1testInstanceSetup,                    //  InstanceSetup
    FsFilter1testInstanceQueryTeardown,            //  InstanceQueryTeardown
    FsFilter1testInstanceTeardownStart,            //  InstanceTeardownStart
    FsFilter1testInstanceTeardownComplete,         //  InstanceTeardownComplete
    NULL,                               //  GenerateFileName
    NULL,                               //  GenerateDestinationFileName
    NULL                                //  NormalizeNameComponent
};

And one in another function

status = FltRequestOperationStatusCallback(Data,
                                           FsFilter1testOperationStatusCallback,
                                           (PVOID)(++OperationStatusCtx));

All entities are declared in a similar way

NTSTATUS    
FsFilter1testInstanceSetup (
_In_ PCFLT_RELATED_OBJECTS FltObjects,
_In_ FLT_INSTANCE_SETUP_FLAGS Flags,
_In_ DEVICE_TYPE VolumeDeviceType,
_In_ FLT_FILESYSTEM_TYPE VolumeFilesystemType
)
1

1 Answers

0
votes

It's IntelliSense problem. The project will be built and work perfectly unless you do something worng or get some compilation errors. In Error List window, just right-click -> toggle "Show IntelliSense errors" off.