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.

66 lines
1.3 KiB

  1. #ifndef _MNICINFO_H
  2. #define _MNICINFO_H
  3. //
  4. // Copyright (c) Microsoft. All Rights Reserved
  5. //
  6. // THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Microsoft.
  7. // The copyright notice above does not evidence any
  8. // actual or intended publication of such source code.
  9. //
  10. // OneLiner : MNicInfo_H interface.
  11. // DevUnit : wlbstest
  12. // Author : Murtaza Hakim
  13. //
  14. // Description:
  15. // -----------
  16. // Include Files
  17. #include <comdef.h>
  18. #include <vector>
  19. #include "MWmiObject.h"
  20. using namespace std;
  21. class MNicInfo
  22. {
  23. public:
  24. enum MNicInfo_Error
  25. {
  26. MNicInfo_SUCCESS = 0,
  27. COM_FAILURE = 1,
  28. INVALID_IP = 2,
  29. };
  30. class Info
  31. {
  32. public:
  33. _bstr_t nicFullName;
  34. _bstr_t guid;
  35. };
  36. // gets the full names and guids of all nics on a specific machine.
  37. // this is remote call.
  38. //
  39. static
  40. MNicInfo_Error
  41. getNicInfo( _bstr_t machineIP,
  42. vector<MNicInfo::Info>* nicList );
  43. // this is for local call.
  44. static
  45. MNicInfo_Error
  46. getNicInfo( vector<MNicInfo::Info>* nicList );
  47. private:
  48. static
  49. MNicInfo_Error
  50. getNicInfo_private( MWmiObject* p_machine,
  51. vector<MNicInfo::Info>* nicList );
  52. };
  53. #endif