diff options
author | Mark Spruiell <mes@zeroc.com> | 2008-06-03 19:32:20 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2008-06-03 19:32:20 -0700 |
commit | 3d649bed4328992f41f567136025f58a019a5159 (patch) | |
tree | 470be901fbbfe5c6cd4269884412b0d36b48dc92 /cppe/demo/IceE/minimal/WinCEClient.cpp | |
parent | local interface fixes for slice2javae (diff) | |
download | ice-3d649bed4328992f41f567136025f58a019a5159.tar.bz2 ice-3d649bed4328992f41f567136025f58a019a5159.tar.xz ice-3d649bed4328992f41f567136025f58a019a5159.zip |
Various Ice-E fixes:
- Bug fix in slice2javae for local interfaces/classes
- Added Ice.LocalObjectHolder
- Reviewed Java/C++ demos and aligned with Ice
- Source code clean up (removed tabs, etc.)
Diffstat (limited to 'cppe/demo/IceE/minimal/WinCEClient.cpp')
-rw-r--r-- | cppe/demo/IceE/minimal/WinCEClient.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/cppe/demo/IceE/minimal/WinCEClient.cpp b/cppe/demo/IceE/minimal/WinCEClient.cpp index b53c29c6f36..8d88664baf2 100644 --- a/cppe/demo/IceE/minimal/WinCEClient.cpp +++ b/cppe/demo/IceE/minimal/WinCEClient.cpp @@ -25,64 +25,64 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmd try { Ice::InitializationData initData; - initData.properties = Ice::createProperties(); + initData.properties = Ice::createProperties(); - // - // Set a default value for "Hello.Proxy" so that the demo will - // run without a configuration file. - // - initData.properties->setProperty("Hello.Proxy", "hello:tcp -p 10000"); + // + // Set a default value for "Hello.Proxy" so that the demo will + // run without a configuration file. + // + initData.properties->setProperty("Hello.Proxy", "hello:tcp -p 10000"); - // - // Now, load the configuration file if present. Under WinCE we - // use "config.txt" since it can be edited with pocket word. - // - try - { - initData.properties->load("config.txt"); - } - catch(const Ice::FileException&) - { - } + // + // Now, load the configuration file if present. Under WinCE we + // use "config.txt" since it can be edited with pocket word. + // + try + { + initData.properties->load("config.txt"); + } + catch(const Ice::FileException&) + { + } - communicator = Ice::initialize(__argc, __argv, initData); + communicator = Ice::initialize(__argc, __argv, initData); - HelloPrx hello = - HelloPrx::checkedCast(communicator->stringToProxy(initData.properties->getProperty("Hello.Proxy"))); - if(!hello) - { - MessageBox(NULL, L"invalid proxy", L"Minimal Client", MB_ICONEXCLAMATION | MB_OK); - return EXIT_FAILURE; - } + HelloPrx hello = + HelloPrx::checkedCast(communicator->stringToProxy(initData.properties->getProperty("Hello.Proxy"))); + if(!hello) + { + MessageBox(NULL, L"invalid proxy", L"Minimal Client", MB_ICONEXCLAMATION | MB_OK); + return EXIT_FAILURE; + } - hello->sayHello(); - MessageBox(NULL, L"Sent \"sayHello()\" message", L"Minimal Client", MB_ICONEXCLAMATION | MB_OK); + hello->sayHello(); + MessageBox(NULL, L"Sent \"sayHello()\" message", L"Minimal Client", MB_ICONEXCLAMATION | MB_OK); } catch(const Ice::Exception& ex) { - TCHAR wtext[1024]; - string err = ex.toString(); - mbstowcs(wtext, err.c_str(), err.size()); - MessageBox(NULL, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); + TCHAR wtext[1024]; + string err = ex.toString(); + mbstowcs(wtext, err.c_str(), err.size()); + MessageBox(NULL, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); - status = EXIT_FAILURE; + status = EXIT_FAILURE; } if(communicator) { - try - { - communicator->destroy(); - } - catch(const Ice::Exception& ex) - { - TCHAR wtext[1024]; - string err = ex.toString(); - mbstowcs(wtext, err.c_str(), err.size()); - MessageBox(NULL, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); + try + { + communicator->destroy(); + } + catch(const Ice::Exception& ex) + { + TCHAR wtext[1024]; + string err = ex.toString(); + mbstowcs(wtext, err.c_str(), err.size()); + MessageBox(NULL, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); - status = EXIT_FAILURE; - } + status = EXIT_FAILURE; + } } return status; |