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.

61 lines
1.9 KiB

  1. 08/07/2001 JosephJ ToDo
  2. 0. Switch to using lower-level wlbsctrl calls.
  3. 1. Load-library the necessary wlbsctrl calls -- get rid from link to wlbsctrl.
  4. 08/08/2001 JosephJ Current list of calls to wlbs...
  5. // CWlbsControl *m_pWlbsControl;
  6. // CWlbsCluster **ppCluster
  7. 09/10/2001 JosephJ Include wlbsutil.lib (wlbs\inc\wlbsutil.h)
  8. This is JUST (what a shame) to include the IpAddressAbcdFromWsz function.
  9. And this is JUST to allow us to get/set from WLBS_REG_PARAM when
  10. wlbsctrl.dll can't be dynamically loaded (typically because it's not
  11. present). Consider cleanup of this.
  12. 01/28/2002 JosephJ implementing CfgUtilSetDHCP
  13. No input parameters.
  14. Returnvalue of 0 implies success.
  15. {
  16. // do basic verification.
  17. //
  18. // ensure that machine specified exists.
  19. vector<MWmiInstance> nicInstance;
  20. checkStatus( &nicInstance );
  21. bool dhcpEnabled;
  22. isDHCPEnabled( dhcpEnabled );
  23. if( dhcpEnabled == true )
  24. {
  25. // dhcp is already enabled.
  26. return MIPAddressAdmin_SUCCESS;
  27. }
  28. // set input parameters.
  29. // no input parameters.
  30. vector<MWmiParameter *> inputParameters;
  31. // set output parameters
  32. vector<MWmiParameter *> outputParameters;
  33. MWmiParameter returnValue(L"ReturnValue");
  34. outputParameters.push_back( &returnValue );
  35. nicInstance[0].runMethod(L"EnableDHCP",
  36. inputParameters,
  37. outputParameters );
  38. if( long ( returnValue.getValue() ) == 0 )
  39. {
  40. return MIPAddressAdmin_SUCCESS;
  41. }
  42. else
  43. {
  44. cout << "enablestatic has return " << long( returnValue.getValue() ) << endl;
  45. return COM_FAILURE;
  46. }
  47. }
  48. 05/08/2002 JosephJ Location of source code that implements
  49. Win32_NetworkAdapterConfiguration (IPAddress, EnableStatic, etc)
  50. admin\wmi\WBEM\Providers\Win32Provider\Providers\netadaptercfg.cpp