Archived
This forum has been archived. Please start a new discussion on GitHub.
may I implement ice in dll
I want to initilize a object in a dll, initialize is right, and StringToProxy is right too, but the proxy's checkcast can not return right value, why? or I do sth wrong ?
BTW, I meeted the same problem in CORBA before, but I do not deal it yet.
BTW, I meeted the same problem in CORBA before, but I do not deal it yet.
0
Comments
-
here is the code of my object which impelment in a dll and be exported
=====================================
void CIce_Connection::init()
{
char* argv[] = {"gdao"};
int argc = 1;
try
{
ic = Ice::initialize(argc, argv);
base = ic->stringToProxy("conn:default -p 10000");
if (!base)
treatError("get proxy error");
proxy = DAOIceConnectionPrx::checkedCast(base);
if (!proxy)
treatError("checkcast error");
}catch(const Ice::Exception & e)
{
treatError("exception found");
}
}0 -
Hello,
Yes, you should be able to build an Ice client inside a DLL.
A common issue that affects CORBA implementation is the use of thread-specific data ... but we don't use thread-specific data in Ice.
Maybe you could give us more details on the error you get, or (even better) a small test-case (source + project file)?
Cheers,
Bernard0 -
thanks bernard, I have implemented it in dll, thanks ice too,
I will keep using ice for anything I will do,0