Home Help Center

may I implement ice in dll

simpleysimpley Member ✭✭
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. :(


  • simpleysimpley Member ✭✭
    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;
    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");

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff

    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)?

  • simpleysimpley Member ✭✭
    thanks bernard, I have implemented it in dll, thanks ice too, :)
    I will keep using ice for anything I will do, :)
Sign In or Register to comment.