Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.6 KiB

  1. #ifndef _DEVEXT_H
  2. #define _DEVEXT_H
  3. //
  4. // Class device extension.
  5. //
  6. #define REGPATHMAX 100
  7. typedef enum {
  8. eBaseDevice = 1,
  9. eBatteryDevice,
  10. eAdaptorDevice
  11. } EXTENSION_TYPE;
  12. typedef struct _CBatteryDevExt {
  13. CUString * m_pBatteryName;
  14. UNICODE_STRING m_RegistryPath; // will be converted to a unicode string
  15. WCHAR m_RegistryBuffer[REGPATHMAX];
  16. PDEVICE_OBJECT m_pHidPdo;
  17. PDEVICE_OBJECT m_pBatteryFdo; // Functional Device Object
  18. PDEVICE_OBJECT m_pLowerDeviceObject; // Detected at AddDevice time
  19. PFILE_OBJECT m_pHidFileObject;
  20. CBattery * m_pBattery;
  21. ULONG m_ulTagCount; // Tag for next battery
  22. BOOLEAN m_bIsStarted; // if non zero, the device is started
  23. BOOLEAN m_bFirstStart; // Need to differentiate between
  24. // first and second start IRP.
  25. BOOLEAN m_bJustStarted; // If set, will open handle on next
  26. // IRP_MN_QUERY_PNP_DEVICE_STATE
  27. ULONG m_ulDefaultAlert1; // Cache DefaultAlert1 accross stop device.
  28. PVOID m_pSelector; // Selector for battery
  29. EXTENSION_TYPE m_eExtType;
  30. PDEVICE_OBJECT m_pOpenedDeviceObject;
  31. PKTHREAD m_OpeningThread;
  32. IO_REMOVE_LOCK m_RemoveLock;
  33. IO_REMOVE_LOCK m_StopLock;
  34. ULONG m_iHibernateDelay;
  35. ULONG m_iShutdownDelay;
  36. } CBatteryDevExt;
  37. #endif // devext.h