title: I am working on PassThrough driver sample in win 10 x86 but it does not print anything using KdPrint. Why?
body: <p>I print using KdPrint(("Hi\n")); in FLT_PREOP_CALLBACK_STATUS
      PtPreOperationPassThrough(
      <em>Inout</em> PFLT_CALLBACK_DATA Data,
      <em>In</em> PCFLT_RELATED_OBJECTS FltObjects,
      _Flt_CompletionContext_Outptr_ PVOID *CompletionContext
      ) and seeing what happens in DebugView Program after open a file . The driver is started as I use driverquery. But I see no output after opening files randomly.</p>
  
  <p>the below exists in my code:</p>
  
  <pre><code>CONST FLT_OPERATION_REGISTRATION Callbacks[] = {
  { IRP_MJ_CREATE,
  0,
  PtPreOperationPassThrough,
  PtPostOperationPassThrough },
  { IRP_MJ_DEVICE_CONTROL,
  0,
  PtPreOperationPassThrough,
  PtPostOperationPassThrough },
  
  { IRP_MJ_CLEANUP,
  0,
  PtPreOperationPassThrough,
  PtPostOperationPassThrough },
  
  { IRP_MJ_OPERATION_END }
  };
  
  //
  //  This defines what we want to filter with FltMgr
  </code></pre>
  
  <p>//</p>
  
  <pre><code>CONST FLT_REGISTRATION FilterRegistration = {
  
  sizeof(FLT_REGISTRATION),         //  Size
  FLT_REGISTRATION_VERSION,           //  Version
  0,                                  //  Flags
  
  NULL,                               //  Context
  Callbacks,                          //  Operation callbacks
  
  PtUnload,                           //  MiniFilterUnload
  
  PtInstanceSetup,                    //  InstanceSetup
  PtInstanceQueryTeardown,            //  InstanceQueryTeardown
  PtInstanceTeardownStart,            //  InstanceTeardownStart
  PtInstanceTeardownComplete,         //  InstanceTeardownComplete
  
  NULL,                               //  GenerateFileName
  NULL,                               //  GenerateDestinationFileName
  NULL                                //  NormalizeNameComponent
  
  };
  
  
  NTSTATUS
  DriverEntry(
  _In_ PDRIVER_OBJECT DriverObject,
  _In_ PUNICODE_STRING RegistryPath
  )
  
  {
  NTSTATUS status;
  
  UNREFERENCED_PARAMETER(RegistryPath);
  
  PT_DBG_PRINT(PTDBG_TRACE_ROUTINES,
      ("PassThrough!DriverEntry: Entered\n"));
  
  //
  //  Register with FltMgr to tell it our callback routines
  //
  
  status = FltRegisterFilter(DriverObject,
      &amp;FilterRegistration,
      &amp;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;
  }
  </code></pre>