[SHELL32_APITEST] -Add tests for Control_RunDLLW.
[reactos.git] / rostests / kmtests / kmtest_drv / kmtest_standalone.c
index a2e397a..2ca8512 100644 (file)
@@ -306,12 +306,10 @@ DriverDispatch(
     IN PDEVICE_OBJECT DeviceObject,
     IN PIRP Irp)
 {
-    NTSTATUS Status = STATUS_SUCCESS;
+    NTSTATUS Status = STATUS_INVALID_DEVICE_REQUEST;
     PIO_STACK_LOCATION IoStackLocation;
     int i;
 
-    PAGED_CODE();
-
     IoStackLocation = IoGetCurrentIrpStackLocation(Irp);
 
     DPRINT("DriverDispatch: Function=%s, Device=%p\n",
@@ -331,6 +329,12 @@ DriverDispatch(
             IoStackLocation->MajorFunction == IRP_MJ_INTERNAL_DEVICE_CONTROL)
         return DeviceControlHandler(DeviceObject, Irp, IoStackLocation);
 
+    /* Return success for create, close, and cleanup */
+    if (IoStackLocation->MajorFunction == IRP_MJ_CREATE ||
+            IoStackLocation->MajorFunction == IRP_MJ_CLOSE ||
+            IoStackLocation->MajorFunction == IRP_MJ_CLEANUP)
+        Status = STATUS_SUCCESS;
+
     /* default handler */
     Irp->IoStatus.Status = Status;
     Irp->IoStatus.Information = 0;