summaryrefslogtreecommitdiff
path: root/cppe/demo/IceE/MFC/client/HelloClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cppe/demo/IceE/MFC/client/HelloClient.cpp')
-rw-r--r--cppe/demo/IceE/MFC/client/HelloClient.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/cppe/demo/IceE/MFC/client/HelloClient.cpp b/cppe/demo/IceE/MFC/client/HelloClient.cpp
index ab8c1da0143..7891a1c635c 100644
--- a/cppe/demo/IceE/MFC/client/HelloClient.cpp
+++ b/cppe/demo/IceE/MFC/client/HelloClient.cpp
@@ -47,8 +47,21 @@ CHelloClientApp::InitInstance()
{
int argc = 0;
Ice::PropertiesPtr properties = Ice::createProperties();
+ //
+ // Set a default value for Hello.Proxy so that the demo will
+ // run without a configuration file.
+ //
properties->setProperty("Hello.Proxy", "hello:tcp -p 10000");
- //properties->load("config");
+ //
+ // Now, load the configuration file if present.
+ //
+ try
+ {
+ properties->load("config");
+ }
+ catch(const Ice::FileException&)
+ {
+ }
communicator = Ice::initializeWithProperties(argc, 0, properties);
}
catch(const Ice::Exception& ex)