Archived
This forum has been archived. Please start a new discussion on GitHub.
use ice in dll?
cool stone
in Help Center
how to using ice client-side in a dll program?
0
Comments
-
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 initIce::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){ }0
