how to using ice client-side in a dll program?
|
|
how to using ice client-side in a dll program?
Last edited by cool stone; 05-22-2007 at 10:42 PM.
You use it just like you use any other DLL. There is nothing special to it.
hello,
My client-side program isn't a exe but a dll,how to coding client-side program?
There is nothing diferent form Ice point of view
you must initialize communicator with the needed properties and the you can call methods on proxys like any Ice application.
Example of the init
Code:Ice::CommunicatorPtr ic; Ice::PropertiesPtr properties=Ice::createProperties(); properties->load(config); Ice::InitializationData initData = Ice::InitializationData(); initData.properties = properties; ic = Ice::initialize(initData); try{ IceGrid::QueryPrx queryPx = IceGrid::QueryPrx::uncheckedCast(ic->stringToProxy("IceGrid/Query")); myserver = MyServerPrx::uncheckedCast( queryPx->findObjectById(ic->stringToIdentity("MyServerId"))); myServer->doSameThing(); }catch(const Ice::Exception& e){ }
hello xdm,
thank you very much! You may give me a demo if you wish。thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)