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.

97 lines
2.8 KiB

  1. /******************************************************************
  2. Copyright (c) 1999 Microsoft Corporation
  3. NlbsNic.H -- WMI provider class definition
  4. Generated by Microsoft WBEM Code Generation Engine
  5. Description:
  6. *******************************************************************/
  7. // Property set identification
  8. //============================
  9. #ifndef _NlbsNic_H_
  10. #define _NlbsNic_H_
  11. #define PROVIDER_NAME_NLBSNIC L"NlbsNic"
  12. #include "MNLBUIData.h"
  13. #include "MNLBProviderSetting.h"
  14. #include <vector>
  15. using namespace std;
  16. // Property name externs -- defined in NlbsNic.cpp
  17. //=================================================
  18. extern const WCHAR* pAdapterGuid ;
  19. extern const WCHAR* pDependent ;
  20. extern const WCHAR* pFriendlyName ;
  21. extern const WCHAR* pFullName ;
  22. class CNlbsNic : public Provider
  23. {
  24. public:
  25. // Constructor/destructor
  26. //=======================
  27. CNlbsNic(LPCWSTR lpwszClassName, LPCWSTR lpwszNameSpace);
  28. virtual ~CNlbsNic();
  29. protected:
  30. // Reading Functions
  31. //============================
  32. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  33. virtual HRESULT GetObject(CInstance* pInstance, long lFlags = 0L);
  34. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  35. // Writing Functions
  36. //============================
  37. virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  38. virtual HRESULT DeleteInstance(const CInstance& Instance, long lFlags = 0L);
  39. // Other Functions
  40. virtual HRESULT ExecMethod( const CInstance& Instance,
  41. const BSTR bstrMethodName,
  42. CInstance *pInParams,
  43. CInstance *pOutParams,
  44. long lFlags = 0L );
  45. // TO DO: Declare any additional functions and accessor
  46. // functions for private data used by this class
  47. //===========================================================
  48. private:
  49. // All data members for CNlbsNic should be included here.
  50. void
  51. GetVectorFromSafeArray( SAFEARRAY*& stringArray,
  52. vector<_bstr_t>& strings );
  53. void
  54. RetreiveAndSetClusterProperties(CInstance *pInParams,
  55. MNLBProviderSetting &nlbs,
  56. ClusterProperties& cp,
  57. const wstring& fullName );
  58. void
  59. FillInPortRules( ClusterData* p_clusterData,
  60. const _bstr_t& myMachine,
  61. const vector<_bstr_t>& portRules );
  62. private:
  63. enum
  64. {
  65. PROTOCOL_BIND_DELAY = 20000,
  66. PROTOCOL_BIND_WAIT_INCREMENT = 1000
  67. };
  68. static WCHAR* version;
  69. };
  70. #endif