Click here to Skip to main content
14,766,603 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
 STDMETHODIMP CThreadingClas::ser_conn(BSTR serport, BSTR log, BSTR pass, BSTR* ret)
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());

	// TODO: Add your implementation code here
	CStringA s(serport);
	csServer_Server=s;
	CStringA p1(pass);
	csServer_Password=p1;
	csServer_Login=_wtoi(log);
	int res;
	if((res=server_q->Connect(csServer_Server))==RET_OK && (res=server_f->Connect(csServer_Server))==RET_OK)
	{
		if((res=server_q->Login(csServer_Login,csServer_Password))==RET_OK && (res=server_f->Login(csServer_Login,csServer_Password))==RET_OK)
		{
		*ret=bstr_t(server_q->ErrorDescription(res));
	}
	else
	{
		*ret=bstr_t(server_q->ErrorDescription(res));
	}
	}
	else
	{
		*ret=bstr_t(server_q->ErrorDescription(res));
	}
	return S_OK;
Posted
Comments
CPallini 15-May-14 3:38am
   
What is the question?
Member 10718181 15-May-14 3:49am
   
whenever server is reconnect in my code UI hanged so this problem solving for using thread but i am not clear idea for Thread so how to using thread in my ser_conn()

1 solution

You may find many tutorials, just Googling for[^].
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900