Page 1 of 2 1 2 LastLast
Results 1 to 15 of 19

Thread: IceE DLL on PDA -> Signature necessary?

  1. #1
    susannesch is offline Registered User
    Name: Susanne Schilling
    Organization: Hydrometer
    Project: accessing an OSGI Framework from C++
    Join Date
    May 2009
    Posts
    33

    IceE DLL on PDA -> Signature necessary?

    Does anyone have experience with IceE on PDAs and Securitiy Problems? Is a Signature necessary to make a DLL with Ice-Code work?
    I can install a DLL with a simple function-call on the PDA and use it. But when I want to use my Ice-DLL, I always get an error when I want to start the application that uses it.

    thanks,
    Susanne

  2. #2
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    No it should not be necessary to sign the Ice-E DLL. What is the error that you are seeing? What platform is this on?

    I expect the issue you are having is that the MS C++ runtime cannot be found. I would suggest that you build your application statically, including linking the C++ runtime statically. In order to do this you need to edit cppe/config/Make.rules.mak and uncomment the following two lines
    Code:
    #STATICLIBS             = yes
    #STATIC_CPP_RUNTIME     = yes
    and then rebuild.

    You will now only have to copy the .exe to your PDA to run the Ice application. If you are not placing multiple Ice applications on your PDA then this will also reduce the amount of space your application will take up on the PDA.

  3. #3
    susannesch is offline Registered User
    Name: Susanne Schilling
    Organization: Hydrometer
    Project: accessing an OSGI Framework from C++
    Join Date
    May 2009
    Posts
    33
    The DLL works meanwhile, but I still have the Problem, that I get an invalid Proxy Error on the PDA I don't get on the desktop-PC. Are there any configuration-settings I have to make on the PDA(Windows Mobile 6)? This is the code:

    int status = 0;
    int argc = 0;
    char* args[1];


    Ice::CommunicatorPtr ic;
    ApplicationLayerFunctionsPrx finder;

    try {

    ic = Ice::initialize(argc, (char**)args);
    Ice::ObjectPrx base = ic->stringToProxy("ApplicationLayer:tcp -h 127.0.0.1 -p 1234");
    finder = ApplicationLayerFunctionsPrx::checkedCast(base);
    if (!finder) {
    throw "Invalid proxy";}
    }

  4. #4
    susannesch is offline Registered User
    Name: Susanne Schilling
    Organization: Hydrometer
    Project: accessing an OSGI Framework from C++
    Join Date
    May 2009
    Posts
    33
    I'm giving the initialize-method the right path to the application plus the name of exe-file plus ".exe" now.Unfurtunately, I still get the same error.
    What could be the cause?
    Thank's for your help!

    Susanne

  5. #5
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    Have you tried running the demos/tests that come with Ice-E? If not I would suggest that you try these first and make sure they work.

    In your example, you report that checkedCast() is returning null. This would indicate that the checkedCast was able to contact a server, but the object type was not the expected type. For other failures, checkedCast should throw an exception. You should make sure you are running the correct server.

    I assume you are running both the client and server on the PDA since you are using 127.0.0.1 as the host. Perhaps you should start by first just running the client on the PDA and the server on another host. You will have to change the host setting in your proxy string appropriately of course for this to work.

  6. #6
    susannesch is offline Registered User
    Name: Susanne Schilling
    Organization: Hydrometer
    Project: accessing an OSGI Framework from C++
    Join Date
    May 2009
    Posts
    33
    The problem is, that both, the client and the server have to run on one PDA. The connection is just there to hand over function calls from old Applications to a DLL to an OSGI-Framework.
    The server is running the same way as on the desktop-PC.

    The code on the server-side is the following:

    ic = Ice.Util.initialize(args);
    Ice.ObjectAdapter adapterAppLayer = ic.createObjectAdapterWithEndpoints(
    "ApplicationLayerAdapter", "tcp -h 127.0.0.1 -p 1234");
    Ice.Object object = new ApplicationLayerFunctionsI();
    adapterAppLayer.add(object, ic.stringToIdentity("ApplicationLayer"));

    so port, IP and Identifier are correct.
    What do you mean when you say the object type was not the expected type?

  7. #7
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    Quote Originally Posted by susannesch View Post
    The problem is, that both, the client and the server have to run on one PDA. The connection is just there to hand over function calls from old Applications to a DLL to an OSGI-Framework.
    Even though you need both running on the PDA in the end, it might still help with debugging your issue to just try the client first from the PDA.

    Quote Originally Posted by susannesch View Post
    The server is running the same way as on the desktop-PC.

    The code on the server-side is the following:

    ic = Ice.Util.initialize(args);
    Ice.ObjectAdapter adapterAppLayer = ic.createObjectAdapterWithEndpoints(
    "ApplicationLayerAdapter", "tcp -h 127.0.0.1 -p 1234");
    Ice.Object object = new ApplicationLayerFunctionsI();
    adapterAppLayer.add(object, ic.stringToIdentity("ApplicationLayer"));

    so port, IP and Identifier are correct.
    What do you mean when you say the object type was not the expected type?
    ApplicationLayerFunctionsPrx::checkedCast returning null should indicate the the specified object was not actually a ApplicationLayerFunctions. Having said that, I don't really see how that could be happening in your example.

    Again, I suggest first trying the demos/tests that come with Ice-E and make sure that they work. Also I recommend building statically like I mentioned before so we can be sure DLLs are not posing any problems.

  8. #8
    susannesch is offline Registered User
    Name: Susanne Schilling
    Organization: Hydrometer
    Project: accessing an OSGI Framework from C++
    Join Date
    May 2009
    Posts
    33
    Okay, thanks. I'll build the whole thing again. Maybe this is really the problem because the application crashes when I try to set InitProperties like in the examples (initData.properties->setProperty("ApplicationLayerFunctions.Proxy", "ApplicationLayer:tcp -h 127.0.0.1 -p 1234")

  9. #9
    susannesch is offline Registered User
    Name: Susanne Schilling
    Organization: Hydrometer
    Project: accessing an OSGI Framework from C++
    Join Date
    May 2009
    Posts
    33
    I've linked the static lib, but when I do that, I get 28 Errors (unresolved external symbols). Did I make a mistake? I've linked iceec_static.lib, because I'm using ICEE_PURE_CLIENT

  10. #10
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    What are the exact errors? Does using icee_static.lib instead fix them? If all your application source files are compiled with ICEE_PURE_CLIENT and do not use any server functionality then you should be able to use iceec_static.lib.

  11. #11
    susannesch is offline Registered User
    Name: Susanne Schilling
    Organization: Hydrometer
    Project: accessing an OSGI Framework from C++
    Join Date
    May 2009
    Posts
    33
    using icee_static.lib doesn't fix the errors. I also chose STATIC_CPP_RUNTIME.
    The errors are the following:

    1>VerbindungsManager.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""__declspec(dllimport) class IceInternal::Handle<class Ice::Communicator> __cdecl Ice::initialize(int &,char * * const,struct Ice::InitializationData const &,int)" (__imp_?initialize@Ice@@YA?AV?$Handle@VCommunicato r@Ice@@@IceInternal@@AAHQAPADABUInitializationData @1@H@Z)".
    1>iceec_static.lib(Transceiver.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "send".
    1>iceec_static.lib(Transceiver.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "recv".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "accept".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "getnameinfo".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "listen".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "getsockopt".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "closesocket".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "WSASetLastError".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "freeaddrinfo".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "socket".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "bind".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "setsockopt".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "getsockname".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "ntohs".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "htons".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "WSAGetLastError".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "getaddrinfo".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "htonl".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "connect".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "WSAIoctl".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "ioctlsocket".
    1>iceec_static.lib(Network.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "getpeername".
    1>iceec_static.lib(Instance.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "WSACleanup".
    1>iceec_static.lib(Instance.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "WSAStartup".
    1>iceec_static.lib(ThreadPool.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "select".
    1>Windows Mobile 6 Professional SDK (ARMV4I)\Release/DLLJAVAPORTMOBILELIB.dll : fatal error LNK1120: 26 nicht aufgelöste externe Verweise.
    1>Das Buildprotokoll wurde unter "file://c:\Dokumente und Einstellungen\user\Eigene Dateien\Visual Studio 2005\Projects\DLLJAVAPORTMOBILELIB\DLLJAVAPORTMOBI LELIB\Windows Mobile 6 Professional SDK (ARMV4I)\Release\BuildLog.htm" gespeichert.
    1>DLLJAVAPORTMOBILELIB - 28 Fehler, 0 Warnung(en)
    ========== Alles neu erstellen: 0 erfolgreich, Fehler bei 1, 0 übersprungen ==========

  12. #12
    susannesch is offline Registered User
    Name: Susanne Schilling
    Organization: Hydrometer
    Project: accessing an OSGI Framework from C++
    Join Date
    May 2009
    Posts
    33
    I solved the problem! I had to compile my own lib that uses the Ice-lib as static lib, too.
    Thank you very much for always replying so fast and for your patience.

    Susanne

  13. #13
    susannesch is offline Registered User
    Name: Susanne Schilling
    Organization: Hydrometer
    Project: accessing an OSGI Framework from C++
    Join Date
    May 2009
    Posts
    33
    Unfortunately, the Problem isn't solved. My Application can't find my exportet Symbol anymore, since I made my DLL a static lib.
    What could be the cause of the linker-errors below?

  14. #14
    susannesch is offline Registered User
    Name: Susanne Schilling
    Organization: Hydrometer
    Project: accessing an OSGI Framework from C++
    Join Date
    May 2009
    Posts
    33
    Ok, now I've got only 3 errors left:

    DLLJAVAPORTMOBILE.lib(VerbindungsManager.obj) : error LNK2001: Nicht aufgelöstes externes Symbol ""__declspec(dllimport) class IceInternal::Handle __cdecl Ice::initialize(int &,char * * const,struct Ice::InitializationData const &,int)" (__imp_?initialize@Ice@@YA?AV?$Handle@VCommunicato r@Ice@@@IceInternal@@AAHQAPADABUInitializationData @1@H@Z)".
    Windows Mobile 6 Professional SDK (ARMV4I)\Release\DLLTestanwendungMobile.exe : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.

    The error doesn't occur, when I compile my library, but when I compile the Application that links my static library.

  15. #15
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    Are you linking your application with the Ice-E library as well? If not, you could try that.
    Dwayne Boone

Page 1 of 2 1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Is it possible to map coments from slice >> C#?
    By Gravitas in forum Help Center
    Replies: 2
    Last Post: 03-04-2011, 11:04 AM
  2. Replies: 1
    Last Post: 05-18-2009, 05:17 PM
  3. Using IcePy as client/server (with signature)
    By eritrea in forum Help Center
    Replies: 3
    Last Post: 03-31-2006, 09:51 PM
  4. Replies: 1
    Last Post: 04-07-2005, 01:06 PM
  5. ServantLocator::deactivate signature
    By andreynech in forum Bug Reports
    Replies: 1
    Last Post: 05-23-2004, 06:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •