股票论坛
标题:
通达信股票池迁移工具
[打印本页]
作者:
星晴
时间:
2016-4-29 13:29
标题:
通达信股票池迁移工具
由于最近从老版本的通达信软件中进行升级,所以有很多股票池需要重新建立。
但是进poolinfo.ini一个个的手工去修改实在不是我等懒人的作风。
于是花了几分钟编写了这么一个刷新股票池数据的工具。
RefreshPool.exe直接放在tpool文件夹下双击运行即可。
【注意:】该程序会重写poolinfo.ini文件,如有额外需求请自行修改源代码。
链接:
http://pan.baidu.com/s/1cwn3Sq
密码:mxmv
#include
#include
#include
#include
#include
#include
#include
std::list FileList;
void find()
{
char sZFind[MAX_PATH];
WIN32_FIND_DATA FindFileData;
strcpy(sZFind,"*.xml");
HANDLE hFind=::FindFirstFile(sZFind,&FindFileData);
if(INVALID_HANDLE_VALUE == hFind)
return;
while(TRUE)
{
FileList.push_back(FindFileData.cFileName);
if(!FindNextFile(hFind,&FindFileData))
break;
}
FindClose(hFind);
}
int main()
{
FileList.clear();
find();
std::fstream fp;
int i = 1;
fp.open("poolinfo.ini", std::ios::out | std::ios::trunc);
fp << "[CONFIG]" << std::endl << "num=" << FileList.size() << std::endl << std::endl;
for (std::list::iterator ip = FileList.begin(); ip != FileList.end(); ip++)
{
fp << "szName" << i << "=" << *ip << std::endl
<< "bSys" << i << "=0" << std::endl
<< "nRunStatus" << i << "=-1" << std::endl
<< std::endl;
i++;
}
fp.close();
return 0;
}
作者:
全民游戏
时间:
2016-4-29 13:40
:(
欢迎光临 股票论坛 (http://100000w.com/)
Powered by Discuz! X3.2