Ejemplo n.º 1
0
STDMETHODIMP InterfaceAccount::put_Address(BSTR newVal)
{
   try
   {
      if (!m_pObject)
         return GetAccessDenied();

      if (!m_pAuthentication->GetIsDomainAdmin())
         return m_pAuthentication->GetAccessDenied();
   
      HM::String sAddress = newVal;
      sAddress.Trim();
   
      m_pObject->SetAddress(sAddress);
      return S_OK;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}
Ejemplo n.º 2
0
STDMETHODIMP InterfaceDomain::put_Name(BSTR newVal)
{
   try
   {
      if (!m_pObject)
         return GetAccessDenied();

      if (!m_pAuthentication->GetIsDomainAdmin())
         return m_pAuthentication->GetAccessDenied();
   
      HM::String sName = newVal;
      sName.Trim();
   
      m_pObject->SetName(sName);
   
      return S_OK;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}