c++ cli - c++/cli Multithreading Socket and form -
could point me in right direction this, seem loop around web in vain...
private: system::void loginbutton_click(system::object^ sender, system::eventargs^ e) { mlogin* lgn; string text = marshal_as<string>(subjectname->text); if (lgn->login(&text) == "master") { delete this; msockserv server; vmaster master; thread^ newthread = gcnew thread(gcnew threadstart(master, &vmaster::showdialog)); newthread->start(); //master.showdialog(); server.sockinit(); } else if (lgn->login(&text) == "slave") { delete this; vslave slave; msockclnt client; thread^ newthread = gcnew thread(gcnew threadstart(client, &msockclnt::sockinit)); newthread->start(); //client.sockinit(text); slave.showdialog(); } else if (lgn->login(&text) == "no") { messagebox::show("not valid username or password"); } } i want start new form in new thread run concurrently socket server or client start in new thread. can't seem start neither socket nor form, errors:
error 1 error c3352: 'showdialog' : specified function not match delegate type 'void (void)'
error 2 error c3352: 'void msockclnt::sockinit(std::string)' : specified function not match delegate type 'void (void)'
although made sure sockinit of type void...
thank you.
Comments
Post a Comment