home *** CD-ROM | disk | FTP | other *** search
- # 10H9767, 10H9769 (C) COPYRIGHT International Business Machines Corp. 1992,1994,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.
-
- **********************************************************************
- * 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.
- **********************************************************************
-
- EMDEMO
-
- DESCRIPTION:
- This sample allows the user to use a graphical user interface
- to set up a timer, update a timer, and register work procedures.
-
- CONCEPT/FEATURE:
- This directory contains a sample program that illustrates the use of
- Event Manager. The executable built is called "main.exe".
-
- HOW TO RUN THE PROJECT FROM THE COMMAND LINE:
- Before building the executable, make sure the environment variable
- SOMIR is set appropriately.
-
- Note also that there are several different ways to build the sample. A
- quick look at main.c will show that you can choose to define preprocessor
- constants that conditionally compile in code that will illustrate the
- EMan loop (ILLUSTRATE_LOOP), or will run the EMan in its own thread
- (THREAD_EMAN). Please try out each of these options by modifying the
- makefile or by adding defines from the nmake command line.
-
-
- To build the sample:
- - "nmake -f vac.mak all".
-
- To clean up the directory after running the samples:
-
- - "nmake -f vac.mak clean".
-
- Before running the program, make sure that the following environment
- variables are set up as follows.
-
- - SOMSOCKETS should not be set on Win32 machines.
- - HOSTNAME should be set to machine on which this program is running.
- (For Win32 Workstation DSOM this must have a value of "localhost")
-
- Run the program "main".
-
- The following are the menu driven commands supported by the sample:
-
- Register
- Work Procedure - Registers a Work procedure to be called back when
- there are no events.
- Timer - Registers a timer that pops every 1000 milliseconds
- Update Timer - Changes the above timer registration to pop
- every 800 milliseconds instead
-
- Unregister
- Work Procedure - Unregisters the above work procedure interest
- Timer - Unregisters the above timer
- Socket - Unregisters the above socket.
-
- Event
- Client 1 - Creates a client event with a method callback
- Client 2 - Creates a client event with a procedure callback
-
- Quit - Exit program
-
-
- HOW TO RUN THE PROJECT FROM WITHIN THE WORKFRAME ENVIRONMENT:
- -Open the project "emdemo.iwp" in this sample directory.
- -To make the project:
- from the "Project" menu, select "Make",
- or from the pop-up menu for the icon "vac.mak", select "Make"
- -From workframe, click "Run", or from the project monitor window,
- type "main" to execute.
- -From the command line, "nmake -f vac.mak clean" to clean up.
-
- VisualAge for C++ SAMPLES INFORMATION:
- A complete listing of samples shipped with the VisualAge for C++
- product can be found in the online GUIDE TO SAMPLES. To access
- this notebook, simply:
-
- - Open the VisualAge for C++ program group in the Program
- Manager window, then
- - Open the GUIDE TO SAMPLES notebook in the program group.
-