本文整理汇总了C++中NppParameters::isInBlackList方法的典型用法代码示例。如果您正苦于以下问题:C++ NppParameters::isInBlackList方法的具体用法?C++ NppParameters::isInBlackList怎么用?C++ NppParameters::isInBlackList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NppParameters
的用法示例。
在下文中一共展示了NppParameters::isInBlackList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadPlugins
bool PluginsManager::loadPlugins(const TCHAR *dir)
{
if (_isDisabled)
return false;
vector<generic_string> dllNames;
vector<generic_string> dll2Remove;
NppParameters * nppParams = NppParameters::getInstance();
generic_string nppPath = nppParams->getNppPath();
generic_string pluginsFullPathFilter = (dir && dir[0])?dir:nppPath;
pluginsFullPathFilter += TEXT("\\plugins\\*.dll");
WIN32_FIND_DATA foundData;
HANDLE hFindFile = ::FindFirstFile(pluginsFullPathFilter.c_str(), &foundData);
if (hFindFile != INVALID_HANDLE_VALUE)
{
generic_string plugins1stFullPath = (dir && dir[0])?dir:nppPath;
plugins1stFullPath += TEXT("\\plugins\\");
plugins1stFullPath += foundData.cFileName;
dllNames.push_back(plugins1stFullPath);
while (::FindNextFile(hFindFile, &foundData))
{
bool isInBlackList = nppParams->isInBlackList(foundData.cFileName);
if (!isInBlackList)
{
generic_string fullPath = (dir && dir[0])?dir:nppPath;
fullPath += TEXT("\\plugins\\");
fullPath += foundData.cFileName;
dllNames.push_back(fullPath);
}
PluginList & pl = nppParams->getPluginList();
pl.add(foundData.cFileName, isInBlackList);
}
::FindClose(hFindFile);
for (size_t i = 0, len = dllNames.size(); i < len ; ++i)
{
loadPlugin(dllNames[i].c_str(), dll2Remove);
}
}
for (size_t j = 0, len = dll2Remove.size() ; j < len ; ++j)
::DeleteFile(dll2Remove[j].c_str());
std::sort(_pluginInfos.begin(), _pluginInfos.end(), [](const PluginInfo *a, const PluginInfo *b) { return a->_funcName < b->_funcName; });
return true;
}