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.

30 lines
912 B

  1. // WMIObjectBrokerRegistration.cpp : Implementation of CWMIObjectBrokerRegistration
  2. #include "stdafx.h"
  3. #include "WMIScriptUtils.h"
  4. #include "WMIObjectBrokerRegistration.h"
  5. #include "CommonFuncs.h"
  6. /////////////////////////////////////////////////////////////////////////////
  7. // CWMIObjectBrokerRegistration
  8. STDMETHODIMP CWMIObjectBrokerRegistration::Register(BSTR strProgId, VARIANT_BOOL *bResult)
  9. {
  10. *bResult = VARIANT_FALSE;
  11. if(SUCCEEDED(RegisterCurrentDoc(GetUnknown(), strProgId)))
  12. *bResult = VARIANT_TRUE;
  13. return S_OK;
  14. }
  15. STDMETHODIMP CWMIObjectBrokerRegistration::UnRegister(BSTR strProgId, VARIANT_BOOL *bResult)
  16. {
  17. *bResult = VARIANT_FALSE;
  18. if(SUCCEEDED(UnRegisterCurrentDoc(GetUnknown(), strProgId)))
  19. *bResult = VARIANT_TRUE;
  20. return S_OK;
  21. }
  22. STDMETHODIMP CWMIObjectBrokerRegistration::SetDevEnvironment(IDispatch *pEnv)
  23. {
  24. return SetVSInstallDirectory(pEnv);
  25. }