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. :(

Comments

  • 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;
    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");
    }

    }
  • bernardbernard Jupiter, FLBernard NormierOrganization: ZeroC, Inc.Project: IceAdministrators, ZeroC Staff ZeroC Staff
    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,
    Bernard
  • 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.