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.

46 lines
1.3 KiB

  1. #ifndef _HWDEV_H
  2. #define _HWDEV_H
  3. #include "namellst.h"
  4. #include "cmmn.h"
  5. #include "misc.h"
  6. ///////////////////////////////////////////////////////////////////////////////
  7. //
  8. // This will enumerate all the Device that we're interested in and create
  9. // additionnal objects to do specialized work
  10. //
  11. ///////////////////////////////////////////////////////////////////////////////
  12. class CHWDeviceInst //: public CDeviceElem
  13. {
  14. public:
  15. // CHWDeviceInst
  16. HRESULT Init(DEVINST devinst);
  17. HRESULT InitInterfaceGUID(const GUID* pguidInterface);
  18. HRESULT GetPnpID(LPWSTR pszPnpID, DWORD cchPnpID);
  19. HRESULT GetDeviceInstance(DEVINST* pdevinst);
  20. HRESULT GetInterfaceGUID(GUID* pguidInterface);
  21. HRESULT IsRemovableDevice(BOOL* pfRemovable);
  22. HRESULT ShouldAutoplayOnSpecialInterface(const GUID* pguidInterface,
  23. BOOL* pfShouldAutoplay);
  24. public:
  25. CHWDeviceInst();
  26. ~CHWDeviceInst();
  27. private:
  28. HRESULT _GetPnpIDRecurs(DEVINST devinst, LPWSTR pszPnpID,
  29. DWORD cchPnpID);
  30. HRESULT _InitPnpInfo();
  31. HRESULT _InitPnpID();
  32. private:
  33. DEVINST _devinst;
  34. WCHAR _szPnpID[MAX_PNPID];
  35. GUID _guidInterface;
  36. };
  37. #endif //_HWDEV_H