none
Errors in Visual studio 2012 mini-filter project template RRS feed

  • Question

  • Hello i started programming my 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 simmilar way

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



    EDIT: It builds fine
    • Edited by sinofis Wednesday, April 17, 2013 12:08 PM
    Sunday, April 7, 2013 10:33 PM

Answers

  • Does it build for you? Intellisense errors are generated by a different build process, so Intellisense errors are not always indicative of real errors. It is especially confused by function type declarations and wpp trace statements

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by sinofis Wednesday, April 17, 2013 12:07 PM
    Monday, April 8, 2013 3:12 AM