summaryrefslogtreecommitdiff
path: root/cpp/demo/Freeze
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2001-09-15 08:13:54 +0000
committerMarc Laukien <marc@zeroc.com>2001-09-15 08:13:54 +0000
commit4cada81a1bf05eb8ea49b09b53fc09deb843bc46 (patch)
treea2a4f20406a6c841cbc2bc3629c19842f4bc6702 /cpp/demo/Freeze
parentmissing .depend (diff)
downloadice-4cada81a1bf05eb8ea49b09b53fc09deb843bc46.tar.bz2
ice-4cada81a1bf05eb8ea49b09b53fc09deb843bc46.tar.xz
ice-4cada81a1bf05eb8ea49b09b53fc09deb843bc46.zip
started with phonebook demo
Diffstat (limited to 'cpp/demo/Freeze')
-rw-r--r--cpp/demo/Freeze/Makefile22
-rw-r--r--cpp/demo/Freeze/phonebook/.depend4
-rw-r--r--cpp/demo/Freeze/phonebook/Client.cpp60
-rw-r--r--cpp/demo/Freeze/phonebook/Makefile48
-rw-r--r--cpp/demo/Freeze/phonebook/PhoneBook.ice44
-rw-r--r--cpp/demo/Freeze/phonebook/PhoneBookI.cpp177
-rw-r--r--cpp/demo/Freeze/phonebook/PhoneBookI.h66
-rw-r--r--cpp/demo/Freeze/phonebook/Server.cpp59
-rw-r--r--cpp/demo/Freeze/phonebook/config2
-rw-r--r--cpp/demo/Freeze/phonebook/phonebookC.dsp155
-rw-r--r--cpp/demo/Freeze/phonebook/phonebookS.dsp163
11 files changed, 800 insertions, 0 deletions
diff --git a/cpp/demo/Freeze/Makefile b/cpp/demo/Freeze/Makefile
new file mode 100644
index 00000000000..fbb867b7b89
--- /dev/null
+++ b/cpp/demo/Freeze/Makefile
@@ -0,0 +1,22 @@
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+top_srcdir = ../..
+
+include $(top_srcdir)/config/Make.rules
+
+SUBDIRS = phonebook
+
+$(EVERYTHING)::
+ @for subdir in $(SUBDIRS); \
+ do \
+ echo "making $@ in $$subdir"; \
+ ( cd $$subdir && $(MAKE) $@ ) || exit 1; \
+ done
diff --git a/cpp/demo/Freeze/phonebook/.depend b/cpp/demo/Freeze/phonebook/.depend
new file mode 100644
index 00000000000..da5a1821954
--- /dev/null
+++ b/cpp/demo/Freeze/phonebook/.depend
@@ -0,0 +1,4 @@
+PhoneBook.o: PhoneBook.cpp PhoneBook.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/IceUtil/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Shared.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/LocalObject.h ../../../include/Ice/LocalException.h
+Client.o: Client.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/IceUtil/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h PhoneBook.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+PhoneBookI.o: PhoneBookI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/IceUtil/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h PhoneBookI.h ../../../include/IceUtil/IceUtil.h ../../../include/IceUtil/Functional.h ../../../include/IceUtil/Handle.h PhoneBook.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+Server.o: Server.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/IceUtil/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h PhoneBookI.h ../../../include/IceUtil/IceUtil.h ../../../include/IceUtil/Functional.h ../../../include/IceUtil/Handle.h PhoneBook.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
diff --git a/cpp/demo/Freeze/phonebook/Client.cpp b/cpp/demo/Freeze/phonebook/Client.cpp
new file mode 100644
index 00000000000..4c54ca32eb2
--- /dev/null
+++ b/cpp/demo/Freeze/phonebook/Client.cpp
@@ -0,0 +1,60 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <PhoneBook.h>
+
+using namespace std;
+
+int
+run(int argc, char* argv[], Ice::CommunicatorPtr communicator)
+{
+ Ice::PropertiesPtr properties = communicator->getProperties();
+ std::string ref = properties->getProperty("PhoneBook.PhoneBook");
+ Ice::ObjectPrx base = communicator->stringToProxy(ref);
+
+ PhoneBookPrx phoneBook = PhoneBookPrx::checkedCast(base);
+
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ Ice::PropertiesPtr properties = Ice::createPropertiesFromFile(argc, argv, "config");
+ communicator = Ice::initializeWithProperties(properties);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/demo/Freeze/phonebook/Makefile b/cpp/demo/Freeze/phonebook/Makefile
new file mode 100644
index 00000000000..069124ce66e
--- /dev/null
+++ b/cpp/demo/Freeze/phonebook/Makefile
@@ -0,0 +1,48 @@
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+top_srcdir = ../../..
+
+CLIENT = client
+SERVER = server
+
+TARGETS = $(CLIENT) $(SERVER)
+
+OBJS = PhoneBook.o
+
+COBJS = Client.o
+
+SOBJS = PhoneBookI.o \
+ Server.o
+
+SRCS = $(OBJS:.o=.cpp) \
+ $(COBJS:.o=.cpp) \
+ $(SOBJS:.o=.cpp)
+
+include $(top_srcdir)/config/Make.rules
+
+CPPFLAGS := -I. $(CPPFLAGS)
+
+$(CLIENT): $(OBJS) $(COBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(LIBS)
+
+$(SERVER): $(OBJS) $(SOBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS)
+
+PhoneBook.h PhoneBook.cpp: PhoneBook.ice $(SLICE)
+ rm -f PhoneBook.h PhoneBook.cpp
+ $(SLICE) PhoneBook.ice
+
+clean::
+ rm -f PhoneBook.h PhoneBook.cpp
+
+include .depend
diff --git a/cpp/demo/Freeze/phonebook/PhoneBook.ice b/cpp/demo/Freeze/phonebook/PhoneBook.ice
new file mode 100644
index 00000000000..3650f3bf03e
--- /dev/null
+++ b/cpp/demo/Freeze/phonebook/PhoneBook.ice
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef PHONE_BOOK_ICE
+#define PHONE_BOOK_ICE
+
+class Entry
+{
+ wstring getName();
+ void setName(wstring name);
+
+ wstring getAddress();
+ void setAddress(wstring address);
+
+ string getNumber();
+ void setNumber(string number);
+
+ void destroy();
+
+ wstring _name;
+ wstring _address;
+ string _number;
+};
+
+sequence<Entry*> Entries;
+sequence<string> EntryIdentities;
+dictionary<wstring, EntryIdentities> EntryIdentitiesDict;
+
+class PhoneBook
+{
+ Entry* createEntry();
+ Entries findEntries(wstring name);
+
+ EntryIdentitiesDict _entryIdentitiesDict;
+};
+
+#endif
diff --git a/cpp/demo/Freeze/phonebook/PhoneBookI.cpp b/cpp/demo/Freeze/phonebook/PhoneBookI.cpp
new file mode 100644
index 00000000000..40e51a1cb49
--- /dev/null
+++ b/cpp/demo/Freeze/phonebook/PhoneBookI.cpp
@@ -0,0 +1,177 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <PhoneBookI.h>
+#include <sstream>
+
+using namespace std;
+using namespace Ice;
+
+EntryI::EntryI(const string& identity, const ObjectAdapterPtr& adapter, const PhoneBookIPtr& phoneBook) :
+ _identity(identity),
+ _adapter(adapter),
+ _phoneBook(phoneBook)
+{
+ __setNoDelete(true);
+
+ try
+ {
+ EntryPrx self = EntryPrx::uncheckedCast(_adapter->add(this, _identity));
+ }
+ catch(...)
+ {
+ __setNoDelete(false);
+ throw;
+ }
+
+ __setNoDelete(false);
+}
+
+EntryI::~EntryI()
+{
+}
+
+wstring
+EntryI::getName()
+{
+ JTCSyncT<JTCMutex> sync(*this);
+ return _name;
+}
+
+void
+EntryI::setName(const wstring& name)
+{
+ JTCSyncT<JTCMutex> sync(*this);
+ _phoneBook->move(_identity, _name, name);
+ _name = name;
+}
+
+wstring
+EntryI::getAddress()
+{
+ JTCSyncT<JTCMutex> sync(*this);
+ return _address;
+}
+
+void
+EntryI::setAddress(const wstring& address)
+{
+ JTCSyncT<JTCMutex> sync(*this);
+ _address = address;
+}
+
+string
+EntryI::getNumber()
+{
+ JTCSyncT<JTCMutex> sync(*this);
+ return _number;
+}
+
+void
+EntryI::setNumber(string number)
+{
+ JTCSyncT<JTCMutex> sync(*this);
+ _number = number;
+}
+
+void
+EntryI::destroy()
+{
+ JTCSyncT<JTCMutex> sync(*this);
+ _adapter->remove(_identity);
+ _phoneBook->remove(_identity, _name);
+}
+
+PhoneBookI::PhoneBookI(const ObjectAdapterPtr& adapter) :
+ _adapter(adapter),
+ _nextEntryIdentity(0)
+{
+}
+
+PhoneBookI::~PhoneBookI()
+{
+}
+
+EntryPrx
+PhoneBookI::createEntry()
+{
+ JTCSyncT<JTCRecursiveMutex> sync(*this);
+
+ ostringstream s;
+ s << _nextEntryIdentity++;
+ string identity = s.str();
+
+ add(identity, L"");
+
+ return EntryPrx::uncheckedCast(_adapter->createProxy(identity));
+}
+
+class IdentityToEntry
+{
+public:
+
+ IdentityToEntry(const ObjectAdapterPtr& adapter) :
+ _adapter(adapter)
+ {
+ }
+
+ EntryPrx operator()(const string& identity)
+ {
+ return EntryPrx::uncheckedCast(_adapter->createProxy(identity));
+ }
+
+private:
+
+ ObjectAdapterPtr _adapter;
+};
+
+Entries
+PhoneBookI::findEntries(const wstring& name)
+{
+ JTCSyncT<JTCRecursiveMutex> sync(*this);
+
+ EntryIdentitiesDict::iterator p = _entryIdentitiesDict.find(name);
+ if (p != _entryIdentitiesDict.end())
+ {
+ Entries entries;
+ transform(p->second.begin(), p->second.end(), back_inserter(entries), IdentityToEntry(_adapter));
+ return entries;
+ }
+ else
+ {
+ return Entries();
+ }
+}
+
+void
+PhoneBookI::add(const string& identity, const wstring& name)
+{
+ JTCSyncT<JTCRecursiveMutex> sync(*this);
+ _entryIdentitiesDict[name].push_back(identity);
+}
+
+void
+PhoneBookI::remove(const string& identity, const wstring& name)
+{
+ JTCSyncT<JTCRecursiveMutex> sync(*this);
+ EntryIdentitiesDict::iterator p = _entryIdentitiesDict.find(name);
+ assert(p != _entryIdentitiesDict.end());
+ p->second.erase(remove_if(p->second.begin(), p->second.end(), bind2nd(equal_to<string>(), identity)),
+ p->second.end());
+}
+
+void
+PhoneBookI::move(const string& identity, const wstring& oldName, const wstring& newName)
+{
+ JTCSyncT<JTCRecursiveMutex> sync(*this);
+ remove(identity, oldName);
+ add(identity, newName);
+}
diff --git a/cpp/demo/Freeze/phonebook/PhoneBookI.h b/cpp/demo/Freeze/phonebook/PhoneBookI.h
new file mode 100644
index 00000000000..f3379984468
--- /dev/null
+++ b/cpp/demo/Freeze/phonebook/PhoneBookI.h
@@ -0,0 +1,66 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef PHONE_BOOK_I_H
+#define PHONE_BOOK_I_H
+
+#include <Ice/Ice.h>
+#include <IceUtil/IceUtil.h>
+#include <PhoneBook.h>
+
+class PhoneBookI;
+typedef IceUtil::Handle<PhoneBookI> PhoneBookIPtr;
+
+class EntryI : public Entry, public JTCMutex
+{
+public:
+
+ EntryI(const std::string& identity, const Ice::ObjectAdapterPtr&, const PhoneBookIPtr&);
+ ~EntryI();
+
+ virtual std::wstring getName();
+ virtual void setName(const std::wstring&);
+
+ virtual std::wstring getAddress();
+ virtual void setAddress(const std::wstring&);
+
+ virtual std::string getNumber();
+ virtual void setNumber(std::string);
+
+ virtual void destroy();
+
+private:
+
+ std::string _identity;
+ Ice::ObjectAdapterPtr _adapter;
+ PhoneBookIPtr _phoneBook;
+};
+
+class PhoneBookI : public PhoneBook, public JTCRecursiveMutex
+{
+public:
+
+ PhoneBookI(const Ice::ObjectAdapterPtr&);
+ ~PhoneBookI();
+
+ virtual EntryPrx createEntry();
+ virtual Entries findEntries(const std::wstring&);
+
+ void add(const std::string&, const std::wstring&);
+ void remove(const std::string&, const std::wstring&);
+ void move(const std::string&, const std::wstring&, const std::wstring&);
+
+private:
+
+ Ice::ObjectAdapterPtr _adapter;
+ Ice::Long _nextEntryIdentity;
+};
+
+#endif
diff --git a/cpp/demo/Freeze/phonebook/Server.cpp b/cpp/demo/Freeze/phonebook/Server.cpp
new file mode 100644
index 00000000000..cff1e1a6b00
--- /dev/null
+++ b/cpp/demo/Freeze/phonebook/Server.cpp
@@ -0,0 +1,59 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <PhoneBookI.h>
+
+using namespace std;
+
+int
+run(int argc, char* argv[], Ice::CommunicatorPtr communicator)
+{
+ Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("PhoneBookAdapter");
+ Ice::ObjectPtr object = new PhoneBookI(adapter);
+ adapter->add(object, "phonebook");
+ adapter->activate();
+ communicator->waitForShutdown();
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ Ice::PropertiesPtr properties = Ice::createPropertiesFromFile(argc, argv, "config");
+ communicator = Ice::initializeWithProperties(properties);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/demo/Freeze/phonebook/config b/cpp/demo/Freeze/phonebook/config
new file mode 100644
index 00000000000..a21b5308810
--- /dev/null
+++ b/cpp/demo/Freeze/phonebook/config
@@ -0,0 +1,2 @@
+PhoneBook.Ping=ping:tcp -p 10000
+Ice.Adapter.PhoneBookAdapter.Endpoints=tcp -p 10000
diff --git a/cpp/demo/Freeze/phonebook/phonebookC.dsp b/cpp/demo/Freeze/phonebook/phonebookC.dsp
new file mode 100644
index 00000000000..eebcac5662c
--- /dev/null
+++ b/cpp/demo/Freeze/phonebook/phonebookC.dsp
@@ -0,0 +1,155 @@
+# Microsoft Developer Studio Project File - Name="phonebookC" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=phonebookC - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "phonebookC.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "phonebookC.mak" CFG="phonebookC - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "phonebookC - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "phonebookC - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "phonebookC - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /Ze /W3 /GR /GX /O2 /I "." /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
+# SUBTRACT CPP /Fr
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ws2_32.lib jtc.lib /nologo /subsystem:console /machine:I386 /out:"client.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "phonebookC - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /Ze /W3 /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /GZ /c
+# SUBTRACT CPP /Fr
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ws2_32.lib jtcd.lib /nologo /subsystem:console /debug /machine:I386 /out:"client.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "phonebookC - Win32 Release"
+# Name "phonebookC - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\PhoneBook.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\PhoneBook.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\PhoneBook.ice
+
+!IF "$(CFG)" == "phonebookC - Win32 Release"
+
+USERDEP__HELLO="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\PhoneBook.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe PhoneBook.ice \
+
+
+"PhoneBook.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"PhoneBook.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "phonebookC - Win32 Debug"
+
+USERDEP__HELLO="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\PhoneBook.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe PhoneBook.ice \
+
+
+"PhoneBook.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"PhoneBook.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/demo/Freeze/phonebook/phonebookS.dsp b/cpp/demo/Freeze/phonebook/phonebookS.dsp
new file mode 100644
index 00000000000..4caaabec614
--- /dev/null
+++ b/cpp/demo/Freeze/phonebook/phonebookS.dsp
@@ -0,0 +1,163 @@
+# Microsoft Developer Studio Project File - Name="phonebookS" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=phonebookS - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "phonebookS.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "phonebookS.mak" CFG="phonebookS - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "phonebookS - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "phonebookS - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "phonebookS - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /Ze /W3 /GR /GX /O2 /I "." /I "../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
+# SUBTRACT CPP /Fr
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ws2_32.lib jtc.lib /nologo /subsystem:console /machine:I386 /out:"server.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "phonebookS - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /Ze /W3 /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /GZ /c
+# SUBTRACT CPP /Fr
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ws2_32.lib jtcd.lib /nologo /subsystem:console /debug /machine:I386 /out:"server.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "phonebookS - Win32 Release"
+# Name "phonebookS - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\PhoneBook.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\PhoneBookI.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Server.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\PhoneBook.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\PhoneBookI.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\PhoneBook.ice
+
+!IF "$(CFG)" == "phonebookS - Win32 Release"
+
+USERDEP__HELLO="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\PhoneBook.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe PhoneBook.ice \
+
+
+"PhoneBook.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"PhoneBook.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "phonebookS - Win32 Debug"
+
+USERDEP__HELLO="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\PhoneBook.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe PhoneBook.ice \
+
+
+"PhoneBook.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"PhoneBook.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project