Ejemplo n.º 1
0
void* Msclient(void*)
{
	TIniFile tf;
	char tmp[256];	

    if (!tf.Open(INI_FILE_NAME))
    {
        printf("can not find\n");
        exit(-1000);
    }

    int marketnum = tf.ReadInt("COMMON","MARKETDATANUM",1);
	int i = 0;

	for(;i<marketnum;i++)
	{
		sprintf(tmp,"MARKETDATA%d",i+1);
		CUstpMs ustpMs;
        ustpMs.InitInstance(tmp,INI_FILE_NAME,&tradepanel);
	}
    while(false)
	{
		SLEEP_SECONDS(5000);
	}
    return 0;
}
Ejemplo n.º 2
0
int main()
{
	TIniFile tf;
	char tmp[256];	
	if (!tf.Open(INI_FILE_NAME))
	{
		printf("不能打开配置文件\n");
		exit(-1000);
	}
	int marketnum = tf.ReadInt("COMMON","MARKETDATANUM",1);
	int i = 0;
	for(;i<marketnum;i++)
	{
		sprintf(tmp,"MARKETDATA%d",i+1);
		CUstpMs ustpMs;
		ustpMs.InitInstance(tmp,INI_FILE_NAME);
	}
	while(true)
	{
		SLEEP_SECONDS(5000);
	}
	return 0;
}