Leaked source code of windows server 2003
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.

44 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. UNICODE_STRING m_RegistryPath; // will be converted to a unicode string
  14. WCHAR m_RegistryBuffer[REGPATHMAX];
  15. PDEVICE_OBJECT m_pHidPdo;
  16. PDEVICE_OBJECT m_pBatteryFdo; // Functional Device Object
  17. PDEVICE_OBJECT m_pLowerDeviceObject; // Detected at AddDevice time
  18. PFILE_OBJECT m_pHidFileObject;
  19. CBattery * m_pBattery;
  20. ULONG m_ulTagCount; // Tag for next battery
  21. BOOLEAN m_bIsStarted; // if non zero, the device is started
  22. BOOLEAN m_bFirstStart; // Need to differentiate between
  23. // first and second start IRP.
  24. BOOLEAN m_bJustStarted; // If set, will open handle on next
  25. // IRP_MN_QUERY_PNP_DEVICE_STATE
  26. ULONG m_ulDefaultAlert1; // Cache DefaultAlert1 accross stop device.
  27. PVOID m_pSelector; // Selector for battery
  28. EXTENSION_TYPE m_eExtType;
  29. PDEVICE_OBJECT m_pOpenedDeviceObject;
  30. PKTHREAD m_OpeningThread;
  31. IO_REMOVE_LOCK m_RemoveLock;
  32. IO_REMOVE_LOCK m_StopLock;
  33. ULONG m_iHibernateDelay;
  34. ULONG m_iShutdownDelay;
  35. } CBatteryDevExt;
  36. #endif // devext.h