当前位置: 首页>>代码示例>>C++>>正文


C++ String::AllocSysString方法代码示例

本文整理汇总了C++中hm::String::AllocSysString方法的典型用法代码示例。如果您正苦于以下问题:C++ String::AllocSysString方法的具体用法?C++ String::AllocSysString怎么用?C++ String::AllocSysString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在hm::String的用法示例。


在下文中一共展示了String::AllocSysString方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: get_String

STDMETHODIMP InterfaceLanguage::get_String(BSTR EnglishString, BSTR *pVal)
{
   try
   {
      if (!language_)
         return GetAccessDenied();

      HM::String sText = language_->GetString(EnglishString);
      *pVal = sText.AllocSysString();
   
      return S_OK;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}
开发者ID:TreeSprite,项目名称:hmailserver,代码行数:17,代码来源:InterfaceLanguage.cpp

示例2: sInput

STDMETHODIMP InterfaceUtilities::SHA256(BSTR Input, BSTR *Output)
{
   try
   {
      HM::String sInput(Input);
   
      HM::String sOutput = HM::Crypt::Instance()->EnCrypt(sInput, HM::Crypt::ETSHA256);
   
      *Output = sOutput.AllocSysString();
   
      return S_OK;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}
开发者ID:bogri5520,项目名称:hMailServer,代码行数:17,代码来源:InterfaceUtilities.cpp

示例3: get_Address

STDMETHODIMP InterfaceTCPIPPort::get_Address(BSTR *pVal)
{
   try
   {
      if (!m_pObject)
         return GetAccessDenied();

      HM::String sIPAddress = m_pObject->GetAddressString();
      *pVal = sIPAddress.AllocSysString();
   
      return S_OK;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}
开发者ID:Bill48105,项目名称:hmailserver,代码行数:17,代码来源:InterfaceTCPIPPort.cpp

示例4: get_Name

STDMETHODIMP InterfaceLanguage::get_Name(BSTR *pVal)
{
   try
   {
      if (!language_)
         return GetAccessDenied();

      HM::String sName = language_->GetName();
      *pVal = sName.AllocSysString();
   
      return S_OK;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}
开发者ID:TreeSprite,项目名称:hmailserver,代码行数:17,代码来源:InterfaceLanguage.cpp

示例5: GetAccessDenied

STDMETHODIMP 
InterfaceIMAPFolder::get_Name(BSTR *pVal)
{
   try
   {
      if (!m_pObject)
         return GetAccessDenied();

      HM::String sUnicode = HM::ModifiedUTF7::Decode(m_pObject->GetFolderName());
      *pVal = sUnicode.AllocSysString();
      return S_OK;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}
开发者ID:bogri5520,项目名称:hMailServer,代码行数:17,代码来源:InterfaceIMAPFolder.cpp

示例6: get_RecipientAddress

STDMETHODIMP InterfaceDistributionListRecipient::get_RecipientAddress(BSTR *pVal)
{
   try
   {
      if (!m_pObject)
         return GetAccessDenied();

   
   
      HM::String sVal = m_pObject->GetAddress();
      *pVal = sVal.AllocSysString();
   
      return S_OK;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}
开发者ID:Bill48105,项目名称:hmailserver,代码行数:19,代码来源:InterfaceDistributionListRecipient.cpp

示例7: TestSpamAssassinConnection

STDMETHODIMP InterfaceAntiSpam::TestSpamAssassinConnection(BSTR hostname, long port, BSTR *messageText, VARIANT_BOOL *pResult)
{
   try
   {
      if (!m_pConfig)
         return GetAccessDenied();

      HM::SpamAssassinTestConnect testClient;
      
      HM::String text;
      *pResult = testClient.TestConnect(hostname, port, text) ? VARIANT_TRUE : VARIANT_FALSE;
      *messageText = text.AllocSysString();
   
      return S_OK;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}
开发者ID:Bill48105,项目名称:hmailserver,代码行数:20,代码来源:InterfaceAntiSpam.cpp

示例8: TestClamAVScanner

STDMETHODIMP InterfaceAntiVirus::TestClamAVScanner(BSTR hostname, long port, BSTR *messageText, VARIANT_BOOL *pResult)
{
   try
   {
      if (!GetIsServerAdmin())
         return GetAccessDenied();

      HM::VirusScannerTester testClient;
   
      HM::String text;
      *pResult = testClient.TestClamAVConnect(hostname, port, text) ? VARIANT_TRUE : VARIANT_FALSE;
      *messageText = text.AllocSysString();
   
      return S_OK;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}
开发者ID:TreeSprite,项目名称:hmailserver,代码行数:20,代码来源:InterfaceAntiVirus.cpp

示例9: TestClamWinScanner

STDMETHODIMP InterfaceAntiVirus::TestClamWinScanner(BSTR clamWinExecutable, BSTR clamWinDatabase, BSTR *messageText, VARIANT_BOOL *pResult)
{
   try
   {
      if (!GetIsServerAdmin())
         return GetAccessDenied();

      HM::VirusScannerTester testClient;
   
      HM::String text;
      *pResult = testClient.TestClamWinVirusScanner(clamWinExecutable, clamWinDatabase, text) ? VARIANT_TRUE : VARIANT_FALSE;
      *messageText = text.AllocSysString();
   
      return S_OK;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}
开发者ID:TreeSprite,项目名称:hmailserver,代码行数:20,代码来源:InterfaceAntiVirus.cpp

示例10: get_DatabaseName

STDMETHODIMP InterfaceDatabase::get_DatabaseName(BSTR *pVal)
{
   try
   {
      if (!config_)
         return GetAccessDenied();

      if (!GetIsServerAdmin())
         return GetAccessDenied();
   
      HM::String sServerName = ini_file_settings_->GetDatabaseName();
   
      *pVal = sServerName.AllocSysString();
   
      return S_OK;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}
开发者ID:AimaTeam-hehai,项目名称:hmailserver,代码行数:21,代码来源:InterfaceDatabase.cpp

示例11: get_LogFile

STDMETHODIMP InterfaceBackupSettings::get_LogFile(BSTR *pVal)
{
   try
   {
      if (!config_)
         return GetAccessDenied();

      HM::String sLogDir = ini_file_settings_->GetLogDirectory();
      if (sLogDir.Right(1) != _T("\\"))
         sLogDir += "\\";
   
      sLogDir += "hmailserver_backup.log";
   
      *pVal = sLogDir.AllocSysString();
      
      return S_OK;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}
开发者ID:AimaTeam-hehai,项目名称:hmailserver,代码行数:22,代码来源:InterfaceBackupSettings.cpp


注:本文中的hm::String::AllocSysString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。