-3
NTSTATUS DriverEntry (_In_ PDRIVER_OBJECT DriverObject,_In_ PUNICODE_STRING RegistryPath)
{
    NTSTATUS status;
    UNREFERENCED_PARAMETER( RegistryPath );

    PT_DBG_PRINT( PTDBG_TRACE_ROUTINES,
                  ("FsFilter1!DriverEntry: Entered\n") );
    status = FltRegisterFilter( DriverObject,
                                &FilterRegistration,
                                &gFilterHandle );

    FLT_ASSERT( NT_SUCCESS( status ) );

    if (NT_SUCCESS( status )) {

        //
        //  Start filtering i/o
        //

        status = FltStartFiltering( gFilterHandle );

        if (!NT_SUCCESS( status )) {

            FltUnregisterFilter( gFilterHandle );
        }
    }

    return status;
}
`

this code is showing me an error: SYSTEM_THREAD_EXCEPTION_NOT_HANDLED and the system is being switch off when I am trying to start service after installation

Alex K.
  • 159,548
  • 29
  • 245
  • 267
Digvijay Rathore
  • 350
  • 5
  • 17

2 Answers2

0

use dbgPrint() at the place of PT_DBG_PRINT and track the same using dbgView it should give you the message.

0

Make sure you have valid FilterRegistration which you pass in to FltRegisterFilter.

samjeba
  • 136
  • 5