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.

82 lines
2.9 KiB

  1. // Driver.h : Declaration of the CDriverPackage
  2. #ifndef __DRIVER_H_
  3. #define __DRIVER_H_
  4. #include "resource.h" // main symbols
  5. /////////////////////////////////////////////////////////////////////////////
  6. // CDriverPackage
  7. class CDevice;
  8. class CDrvSearchSet;
  9. class CStrings;
  10. class ATL_NO_VTABLE CDriverPackage :
  11. public CComObjectRootEx<CComSingleThreadModel>,
  12. public IDispatchImpl<IDriverPackage, &IID_IDriverPackage, &LIBID_DEVCON2Lib>
  13. {
  14. private:
  15. struct DriverListCallbackContext {
  16. CStrings *pList;
  17. HRESULT hr;
  18. };
  19. static UINT CALLBACK GetDriverListCallback(PVOID Context,UINT Notification,UINT_PTR Param1,UINT_PTR Param2);
  20. static UINT CALLBACK GetManifestCallback(PVOID Context,UINT Notification,UINT_PTR Param1,UINT_PTR Param2);
  21. protected:
  22. CDrvSearchSet *pDrvSearchSet;
  23. SP_DRVINFO_DATA DrvInfoData;
  24. public:
  25. CDriverPackage()
  26. {
  27. pDrvSearchSet = NULL;
  28. ZeroMemory(&DrvInfoData,sizeof(DrvInfoData));
  29. }
  30. ~CDriverPackage();
  31. DECLARE_PROTECT_FINAL_CONSTRUCT()
  32. BEGIN_COM_MAP(CDriverPackage)
  33. COM_INTERFACE_ENTRY(IDriverPackage)
  34. COM_INTERFACE_ENTRY(IDispatch)
  35. END_COM_MAP()
  36. // IDriverPackage
  37. public:
  38. STDMETHOD(get_Rank)(/*[out, retval]*/ long *pVal);
  39. STDMETHOD(put_Rank)(/*[in]*/ long newVal);
  40. STDMETHOD(get_OldInternetDriver)(/*[out, retval]*/ VARIANT_BOOL *pVal);
  41. STDMETHOD(get_OldDriver)(/*[out, retval]*/ VARIANT_BOOL *pVal);
  42. STDMETHOD(get_NoDriver)(/*[out, retval]*/ VARIANT_BOOL *pVal);
  43. STDMETHOD(get_FromInternet)(/*[out, retval]*/ VARIANT_BOOL *pVal);
  44. STDMETHOD(get_ExcludeFromList)(/*[out, retval]*/ VARIANT_BOOL *pVal);
  45. STDMETHOD(put_ExcludeFromList)(/*[in]*/ VARIANT_BOOL newVal);
  46. STDMETHOD(get_ProviderIsDuplicate)(/*[out, retval]*/ VARIANT_BOOL *pVal);
  47. STDMETHOD(get_DescriptionIsDuplicate)(/*[out, retval]*/ VARIANT_BOOL *pVal);
  48. STDMETHOD(get_IsCompatibleDriver)(/*[out, retval]*/ VARIANT_BOOL *pVal);
  49. STDMETHOD(get_IsClassDriver)(/*[out, retval]*/ VARIANT_BOOL *pVal);
  50. STDMETHOD(get_Reject)(/*[out, retval]*/ VARIANT_BOOL *pVal);
  51. STDMETHOD(put_Reject)(/*[in]*/ VARIANT_BOOL newVal);
  52. STDMETHOD(Manifest)(/*[out,retval]*/ LPDISPATCH * pManifest);
  53. STDMETHOD(DriverFiles)(/*[out,retval]*/ LPDISPATCH * pDriverFiles);
  54. STDMETHOD(get_DriverDescription)(/*[out, retval]*/ BSTR *pVal);
  55. STDMETHOD(get_CompatibleIds)(/*[out, retval]*/ LPDISPATCH *pVal);
  56. STDMETHOD(get_HardwareIds)(/*[out, retval]*/ LPDISPATCH *pVal);
  57. STDMETHOD(get_ScriptFile)(/*[out, retval]*/ BSTR *pVal);
  58. STDMETHOD(get_ScriptName)(/*[out, retval]*/ BSTR *pVal);
  59. STDMETHOD(get_Version)(/*[out, retval]*/ BSTR *pVal);
  60. STDMETHOD(get_Date)(/*[out, retval]*/ DATE *pVal);
  61. STDMETHOD(get_Provider)(/*[out, retval]*/ BSTR *pVal);
  62. STDMETHOD(get_Manufacturer)(/*[out, retval]*/ BSTR *pVal);
  63. STDMETHOD(get_Description)(/*[out, retval]*/ BSTR *pVal);
  64. //
  65. // helpers
  66. //
  67. BOOL IsSame(PSP_DRVINFO_DATA pInfo);
  68. HRESULT Init(CDrvSearchSet *pSet,PSP_DRVINFO_DATA pDrvInfoData);
  69. };
  70. #endif //__DRIVER_H_