can ice server program support mfc project based dialog ? i have developed a mfc project based dialog with ice, but ice has memory allocation error?
why?
code is below:
void CQuoteSvrDlg::OnBnClickedStart()
{
// TODO: Add your control notification handler code here
int status = 0;
Ice::CommunicatorPtr ic;
try {
int argc;
//char* argv[] = {"0"};
ic = Ice::initialize();
Ice::ObjectAdapterPtr adapter
= ic->createObjectAdapterWithEndpoints(
"HelloAdapter", "default -h 127.0.0.1 -p 10000");
Ice::ObjectPtr object = new HelloI;
adapter->add(object,
ic->stringToIdentity("Hello"));
adapter->activate();
ic->waitForShutdown();
} catch (const Ice::Exception & e) {
//cerr << e << endl;
status = 1;
} catch (const char * msg) {
//cerr << msg << endl;
status = 1;
}
if (ic) {
try {
ic->destroy();
} catch (const Ice::Exception & e) {
//cerr << e << endl;
status = 1;
}
}
}

Reply With Quote