Ejemplo n.º 1
0
STDMETHODIMP InterfaceMessage::get_InternalDate(VARIANT *pVal)
{
   try
   {
      if (!m_pObject)
         return GetAccessDenied();

      HM::DateTime dt = HM::Time::GetDateFromSystemDate(m_pObject->GetCreateTime());
   
      *pVal  = dt.GetVariant();
      return S_OK;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}
STDMETHODIMP InterfaceAccount::get_LastLogonTime(VARIANT *pVal)
{
   try
   {
      if (!object_)
         return GetAccessDenied();

      HM::DateTime dt = Time::GetDateFromSystemDate(object_->GetLastLogonTime());
      
      *pVal  = dt.GetVariant();
      return S_OK;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}