#endif /* !LIBCAPTIVE */
}
+#ifndef LIBCAPTIVE
+ /* W32 expects CreatedDeviceObject->DeviceExtension to follow *CreatedDeviceObject!
+ * Undocumented by W32!
+ * See also IoCreateDevice().
+ */
/* free device extension */
if (DeviceObject->DeviceObjectExtension)
ExFreePool (DeviceObject->DeviceObjectExtension);
+#endif /* LIBCAPTIVE */
/* remove device from driver device list */
Previous = DeviceObject->DriverObject->DeviceObject;
#ifdef LIBCAPTIVE
/* W32 expects CreatedDeviceObject->DeviceExtension to follow *CreatedDeviceObject!
* Undocumented by W32!
+ * See also IoDeleteDevice().
*/
/* TODO:thread */
IoDeviceObjectType->NonpagedPoolCharge = sizeof (DEVICE_OBJECT) + DeviceExtensionSize;
#ifdef LIBCAPTIVE
/* W32 expects CreatedDeviceObject->DeviceExtension to follow *CreatedDeviceObject!
* Undocumented by W32!
+ * See also IoDeleteDevice().
*/
/* TODO:thread */
IoDeviceObjectType->NonpagedPoolCharge = sizeof (DEVICE_OBJECT); /* restore */
#else /* !LIBCAPTIVE */
/* W32 expects CreatedDeviceObject->DeviceExtension to follow *CreatedDeviceObject!
* Undocumented by W32!
+ * See also IoDeleteDevice().
*/
CreatedDeviceObject->DeviceExtension = (void *)(CreatedDeviceObject+1);
#endif /* LIBCAPTIVE */