Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 07-03-2009
susannesch 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
Reply With Quote
  #2 (permalink)  
Old 07-06-2009
dwayne's Avatar
dwayne 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: 363
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.
Reply With Quote
  #3 (permalink)  
Old 07-06-2009
susannesch 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";}
}
Reply With Quote
  #4 (permalink)  
Old 07-06-2009
susannesch 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
Reply With Quote
  #5 (permalink)  
Old 07-06-2009
dwayne's Avatar
dwayne 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: 363
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.
Reply With Quote
  #6 (permalink)  
Old 07-06-2009
susannesch 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?
Reply With Quote
  #7 (permalink)  
Old 07-06-2009
dwayne's Avatar
dwayne 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: 363
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.
Reply With Quote
  #8 (permalink)  
Old 07-06-2009
susannesch 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")
Reply With Quote
  #9 (permalink)  
Old 07-06-2009
susannesch 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
Reply With Quote
  #10 (permalink)  
Old 07-06-2009
dwayne's Avatar
dwayne 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: 363
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.
Reply With Quote
  #11 (permalink)  
Old 07-07-2009
susannesch 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 ==========
Reply With Quote
  #12 (permalink)  
Old 07-07-2009
susannesch 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
Reply With Quote
  #13 (permalink)  
Old 07-08-2009
susannesch 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?
Reply With Quote
  #14 (permalink)  
Old 07-08-2009
susannesch 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.
Reply With Quote
  #15 (permalink)  
Old 07-08-2009
dwayne's Avatar
dwayne 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: 363
Are you linking your application with the Ice-E library as well? If not, you could try that.
__________________
Dwayne Boone
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
IceE-1.2.0 running... kraps33 Help Center 10 08-22-2008 08:02 AM
IceE and AMI/AMD albertods Help Center 1 10-11-2006 02:34 PM
getifaddrs() does not supported by glibc, IceE fails to make app in /IceE/test syseeker Help Center 2 07-02-2006 09:27 PM
Using IcePy as client/server (with signature) eritrea Help Center 3 03-31-2006 08:51 PM
ServantLocator::deactivate signature andreynech Bug Reports 1 05-23-2004 05:08 PM


All times are GMT -4. The time now is 08:52 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2009 ZeroC, Inc.