本文整理汇总了C++中ACE_TString::strstr方法的典型用法代码示例。如果您正苦于以下问题:C++ ACE_TString::strstr方法的具体用法?C++ ACE_TString::strstr怎么用?C++ ACE_TString::strstr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACE_TString
的用法示例。
在下文中一共展示了ACE_TString::strstr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dll_str
//.........这里部分代码省略.........
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("ACE (%P|%t) DLL_Handle::open ")
ACE_TEXT ("(\"%s\", 0x%x) -> %s: %s\n"),
name->c_str (),
open_mode,
((this->handle_ != ACE_SHLIB_INVALID_HANDLE)
? ACE_TEXT ("succeeded")
: ACE_TEXT ("failed")),
this->error()->c_str()));
}
if (this->handle_ != ACE_SHLIB_INVALID_HANDLE) // Good one?
break;
// If errno is ENOENT we just skip over this one,
// anything else - like an undefined symbol, for
// instance must be flagged here or the next error will
// mask it.
// @TODO: If we've found our DLL _and_ it's
// broken, should we continue at all?
if ((errno != 0) && (errno != ENOENT) && ACE::debug ())
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("ACE (%P|%t) DLL_Handle::open ")
ACE_TEXT ("(\'%s\') failed, errno=")
ACE_TEXT ("%d: %s\n"),
name->c_str (),
errno,
this->error ()->c_str ()));
#if defined (AIX)
// AIX often puts the shared library file (most often named
// shr.o) inside an archive library. If this is an archive
// library name, then try appending [shr.o] and retry.
if (ACE_TString::npos != name->strstr (ACE_TEXT (".a")))
{
ACE_TCHAR aix_pathname[MAXPATHLEN + 1];
ACE_OS::strncpy (aix_pathname,
name->c_str (),
name->length ());
aix_pathname[name->length ()] = '\0';
ACE_OS::strcat (aix_pathname, ACE_TEXT ("(shr.o)"));
open_mode |= RTLD_MEMBER;
if (ACE::debug ())
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("ACE (%P|%t) DLL_Handle::open ")
ACE_TEXT ("(\"%s\", 0x%x) -> %s: %s\n"),
aix_pathname,
open_mode,
ACE_TEXT ((this->handle_ != ACE_SHLIB_INVALID_HANDLE)
? "succeeded"
: "failed"),
this->error()->c_str()));
}
this->handle_ = ACE_OS::dlopen (aix_pathname, open_mode);
if (this->handle_ != ACE_SHLIB_INVALID_HANDLE)
break;
// If errno is ENOENT we just skip over this one, anything
// else - like an undefined symbol, for instance
// must be flagged here or the next error will mask it.
//
// @TODO: If we've found our DLL _and_ it's broken,
// should we continue at all?