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.

72 lines
2.4 KiB

  1. #pragma once
  2. #include <ncxbase.h>
  3. #include <nceh.h>
  4. #include <notifval.h>
  5. #include "resource.h"
  6. class ATL_NO_VTABLE CNwlnkNB :
  7. public CComObjectRoot,
  8. public CComCoClass<CNwlnkNB, &CLSID_CNwlnkNB>,
  9. public INetCfgComponentControl,
  10. public INetCfgComponentSetup,
  11. public INetCfgComponentNotifyGlobal
  12. {
  13. public:
  14. CNwlnkNB();
  15. ~CNwlnkNB();
  16. BEGIN_COM_MAP(CNwlnkNB)
  17. COM_INTERFACE_ENTRY(INetCfgComponentControl)
  18. COM_INTERFACE_ENTRY(INetCfgComponentSetup)
  19. COM_INTERFACE_ENTRY(INetCfgComponentNotifyGlobal)
  20. END_COM_MAP()
  21. // DECLARE_NOT_AGGREGATABLE(CNwlnkNB)
  22. // Remove the comment from the line above if you don't want your object to
  23. // support aggregation. The default is to support it
  24. DECLARE_REGISTRY_RESOURCEID(IDR_REG_NWLNKNB)
  25. // Enable/Disable Action
  26. enum NBSTATE {eStateNoChange, eStateDisable, eStateEnable};
  27. // Install Action (Unknown, Install, Remove)
  28. enum INSTALLACTION {eActUnknown, eActInstall, eActRemove};
  29. // INetCfgComponentControl
  30. STDMETHOD (Initialize) (
  31. IN INetCfgComponent* pIComp,
  32. IN INetCfg* pINetCfg,
  33. IN BOOL fInstalling);
  34. STDMETHOD (ApplyRegistryChanges) ();
  35. STDMETHOD (ApplyPnpChanges) (
  36. IN INetCfgPnpReconfigCallback* pICallback) { return S_OK; }
  37. STDMETHOD (CancelChanges) ();
  38. STDMETHOD (Validate) ();
  39. // INetCfgComponentSetup
  40. STDMETHOD (ReadAnswerFile) (PCWSTR pszAnswerFile,
  41. PCWSTR pszAnswerSection);
  42. STDMETHOD (Upgrade) (DWORD, DWORD) {return S_OK;}
  43. STDMETHOD (Install) (DWORD);
  44. STDMETHOD (Removing) ();
  45. // INetCfgNotifyGlobal
  46. STDMETHOD (GetSupportedNotifications) (DWORD* pdwNotificationFlag );
  47. STDMETHOD (SysQueryBindingPath) (DWORD dwChangeFlag, INetCfgBindingPath* pncbp);
  48. STDMETHOD (SysQueryComponent) (DWORD dwChangeFlag, INetCfgComponent* pncc);
  49. STDMETHOD (SysNotifyBindingPath) (DWORD dwChangeFlag, INetCfgBindingPath* pncbp);
  50. STDMETHOD (SysNotifyComponent) (DWORD dwChangeFlag, INetCfgComponent* pncc);
  51. private:
  52. VOID UpdateNwlnkNbStartType(VOID);
  53. VOID UpdateBrowserDirectHostBinding(VOID);
  54. private:
  55. INetCfgComponent* m_pnccMe;
  56. INetCfg* m_pNetCfg;
  57. INSTALLACTION m_eInstallAction;
  58. NBSTATE m_eNbState;
  59. };