本文整理汇总了C++中COptions::Options方法的典型用法代码示例。如果您正苦于以下问题:C++ COptions::Options方法的具体用法?C++ COptions::Options怎么用?C++ COptions::Options使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COptions
的用法示例。
在下文中一共展示了COptions::Options方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Init
//---------------------------------------------------------------------------//
// Init
//
//---------------------------------------------------------------------------//
bool CFilterDll::Init(COptions &aOptions)
{
m_Ok = false;
const string &sFile = aOptions.Option("library");
if (sFile == "")
{
GLOG(("ERR: Library file not specified\n"));
return false;
}
m_hLibrary = LoadLibrary(sFile.c_str());
if (!m_hLibrary)
{
GLOG(("ERR: Can't load library %s\n", sFile.c_str()));
return false;
}
if (!LoadFunctions())
{
GLOG(("ERR: FilterDLL version from file %s is not compatible with current version (%d)\n", sFile.c_str(), FILTER_VERSION));
FreeLibrary(m_hLibrary);
return false;
}
// Filter init
int iErr = m_pFncInit(FILTER_VERSION, this, g_DisplayDevice.GetD3DDevice(), aOptions.Options(), &m_uID);
if (iErr)
{
if (iErr == -1)
GLOG(("ERR: FilterDLL version from file %s is not compatible with this one (%d)\n", sFile.c_str(), FILTER_VERSION));
else
GLOG(("ERR: FilterDLL can't load library %s. Return code = %d\n", sFile.c_str(), iErr));
FreeLibrary(m_hLibrary);
return false;
}
m_Ok = true;
return m_Ok;
}