#
#   COMPONENT_NAME: somx
#
#   ORIGINS: 27
#
#
#    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1996
#   All Rights Reserved
#   Licensed Materials - Property of IBM
#   US Government Users Restricted Rights - Use, duplication or
#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
#    @(#) 1.5 src/somples.nt/somd/cpp/stack/readme.txt, somples.somd, som3.0, s309651d 12/19/96 17:51:09 [12/23/96 08:42:18]

/*
 *
 * DISCLAIMER OF WARRANTIES.
 * The following [enclosed] code is sample code created by IBM
 * Corporation. This sample code is not part of any standard or IBM
 * product and is provided to you solely for the purpose of assisting
 * you in the development of your applications.  The code is provided
 * "AS IS". IBM MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
 * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE, REGARDING THE FUNCTION OR PERFORMANCE OF
 * THIS CODE.  IBM shall not be liable for any damages arising out of
 * your use of the sample code, even if they have been advised of the
 * possibility of such damages.
 *
 * DISTRIBUTION.
 * This sample code can be freely distributed, copied, altered, and
 * incorporated into other software, provided that it bears the above
 * Copyright notice and DISCLAIMER intact.
 */

NOTE:  Please review the readme.txt in %SOMBASE%\samples for general
       information on setting up and running DSOM samples.

Sample summary
--------------
Used in the SOMobjects Developer Toolkit Users Guide as first example of
DSOM usage.

Making the sample
-----------------
BEFORE making the sample, the DSOM daemon must be running (enter "start somdd"
to start it in the background) and the Name Service must have been configured 
using som_cfg, as described in the readme.txt file in %SOMBASE%\samples.  
This is because the makefile for the sample registers the servers and classes 
in the Name Service.

The makefile in this directory will build a client executable and a 
dynamically loadable library.  They are: 
 
 - client.exe (the DSOM client application) 
 
 - stack.dll (the library loaded by the server) 
 
Entering "nmake -f vac.mak" will not only build the above but it will also 
build the interface and implementation repositories that the 
servers will utilize. 
 
Running the sample
------------------
Before running the sample, remember to start the DSOM daemon in this
directory. If the daemon is currently running you must first kill it and
restart it in this directory.  To start the daemon, enter:

   start somdd
and wait for it to issue the "DSOM - Ready" message.

Once the daemon is started, entering "client" from the command line will 
run the sample.  The server will be started automatically and the results 
be displayed to standard output. 
 
You may also start the server yourself by entering "somdsvr -a stackServer2" 
from the command line.  Note that "stackServer2" is the server alias name 
specified in the makefile when calling the Implementation Repository  
registration utility, regimpl. 

Cleaning up the sample 
---------------------- 
BEFORE cleaning up the sample, the DSOM daemon "somdd" must be running.
This is because the makefile for the sample deregisters the servers and 
classes in the Name Service. 
 
Terminate all the instances of somdsvr.  This is because the servers will have 
the som.ir and dlls locked so they can't be erased.  To clean up the sample, 
enter "nmake -f vac.mak clean".  This will delete all non-source files and
deregister itself from the Name Service and Implementation Repository. 
 
The daemon "somdd" will restart the naming server to deregister the sample. 
