65,186
社区成员




bool GetPluginNames(vector<string> &v)
{
WIN32_FIND_DATA FindFileData;
HANDLE hfind = INVALID_HANDLE_VALUE;
string strDirSpec;// = PLUGIN_PATH;
strDirSpec +="*";
hfind = FindFirstFile(strDirSpec.c_str(),&FindFileData);
if(hfind == INVALID_HANDLE_VALUE)
{
return false;
}
do {
int length = strlen(FindFileData.cFileName);
if((FindFileData.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY) || length<4 )
{
continue;
}
if(!((FindFileData.cFileName[length-1] == 'l') || (FindFileData.cFileName[length-1] == 'L')))
{
continue;
}
if(!((FindFileData.cFileName[length-2] == 'l') || (FindFileData.cFileName[length-2] == 'L')))
{
continue;
}
if(!((FindFileData.cFileName[length-3] == 'd') || (FindFileData.cFileName[length-3] == 'D')))
{
continue;
}
if(FindFileData.cFileName[length-4] != '.') continue;
string strName ;//= PLUGIN_PATH;
// strName +="\\";
strName += FindFileData.cFileName;
v.push_back(strName);
} while(FindNextFile(hfind,&FindFileData));
}