home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / CMSTOP.ZIP / CMSTOP / CMSTOP.DOC
Text File  |  1991-12-05  |  6KB  |  144 lines

  1.  
  2.  
  3.    Extended Services Version 1.0
  4.    (c) Copyright International Business Machines Corp., 1988, 1991
  5.  
  6.  
  7.  
  8.    CMSTOP SAMPLE PROGRAM
  9.  
  10.    The CMSTOP sample program is an example of an application program written
  11.    using the CmkDeactivateService verb. The function of the sample program is
  12.    to request the Communications Manager to start its exit processing.
  13.  
  14.    The sample program is designed to work in the OS/2 protect mode,
  15.    with Extended Services 1.0 Communications Manager. Sample program
  16.    source code and the supporting files are provided for C.
  17.  
  18.    RESTRICTIONS
  19.  
  20.    CMSTOP uses the Communications Manager API CmkDeactivateService.  This
  21.    API simulates a user selecting Exit from the Advanced Pull Down on the
  22.    Main Menu.  For this API to work the Communications Manager must be
  23.    displaying the Main Menu,  otherwise it will take effect when the
  24.    Main Menu is re-displayed.
  25.  
  26.    PREREQUISITE INFORMATION
  27.  
  28.    To run the sample programs, a user must be familiar with the following:
  29.  
  30.    1.  OS/2 installation and command prompt
  31.    2.  Installation of the Toolkit
  32.    3.  Extended Services Communications Manager installation
  33.    4.  Compiler of the language in which you are interested.
  34.  
  35.    INSTALLATION
  36.  
  37.    To build the CMSTOP sample program, the following programs must
  38.    be installed on the build machine:
  39.  
  40.    1. OS/2 Standard Edition Version 1.30.1 or
  41.       OS/2 Standard Edition Version 2.0
  42.    2. IBM Extended Services Version 1.0 with Communications Manager
  43.       and with the Communications Manager API data structures
  44.    3. OS/2 Standard Edition Version 1.3 Programming Tools and Information
  45.       (Toolkit)
  46.    4. Microsoft C Version 6.0 or equivalent compiler.
  47.  
  48.    INSTALLING IBM EXTENDED SERVICES VERSION 1.0
  49.  
  50.    Install OS/2 and the Communications Manager according to instructions
  51.    in the documentation provided with the product.
  52.  
  53.    CREATING CMSTOP SAMPLE PROGRAM CONFIGURATION FILES
  54.  
  55.    No special configuration is required.
  56.  
  57.    INSTALLING THE COMPILER
  58.  
  59.    Install the compiler for the language in which you are interested.
  60.    Use the installation procedure for the compiler.   Refer to the
  61.    following section on supported languages for additional information.
  62.  
  63.    Note:  The instructions that you are to type at the OS/2 command prompt
  64.           show the command line with the path for information only.  For
  65.           example, [C:] is displayed, but you should not type
  66.           it at the OS/2 command prompt.  Also, you should not type the
  67.           instruction [press Enter].
  68.  
  69.    SUPPORTED LANGUAGES
  70.  
  71.    1.  C LANGUAGE SETUP
  72.  
  73.        a.  INSTALLING THE C COMPILER
  74.  
  75.            Install the Microsoft C Compiler Version 6.0 using the
  76.            installation procedure for the compiler. The SETUP program is
  77.            used to install the compiler.  Insert the Setup diskette
  78.            in drive A, make drive A the current drive and type the
  79.            following at the OS/2 command prompt:
  80.  
  81.              [A:\]setup  [press Enter]
  82.  
  83.            Follow the directions provided by the menus.  Select the
  84.            default directories and subdirectories, and be certain the
  85.            large model compiler is selected. The compiler is installed
  86.            at this point.
  87.  
  88.        b.  SETTING UP ENVIRONMENT VARIABLES
  89.  
  90.            During the compiler installation, a file called NEW-VARS.CMD
  91.            is placed in the C:\C600\BIN directory.  This file contains
  92.            commands to setup environment variables used by the Microsoft
  93.            C compiler.  These commands can be copied to the CONFIG.SYS
  94.            file and the computer rebooted or you can just simply use
  95.            NEW-VARS.CMD file directly.  In any case, the path to the
  96.            C:\CMLIB directory needs to be added to the INCLUDE and LIB
  97.            environment variables.  This allows the compiler to find the
  98.            ACDI_C.H and the ACS.LIB files that are in the C:\CMLIB
  99.            directory.  Likewise, the path to the toolkit include directory
  100.            should be included on the INCLUDE environment variable.  The
  101.            path to the toolkit library directory should be included on
  102.            the LIB environment variable.  The INCLUDE and LIB environment
  103.            commands should look something like this:
  104.  
  105.            SET INCLUDE=C:\C600\INCLUDE;C:\TOOLKT13\C\INCLUDE;C:\CMLIB;
  106.            SET LIB=C:\C600\LIB;C:\OS2;C:\TOOLKT13\LIB:C:\CMLIB;
  107.  
  108.            You should also make sure that the PATH environment variable
  109.            includes the paths to the C compiler and toolkit binary files.
  110.            The PATH should have as a minimum:
  111.  
  112.            SET PATH=C:\C600\BINB;C:\C600\BINP;C:\CMLIB;C:\TOOLKT13\BIN;
  113.  
  114.            The PATH command will most likely contain many additional paths.
  115.  
  116.        c.  BUILDING THE SAMPLE PROGRAMS
  117.  
  118.            Create a directory on the build machine called SAMPBLD.  Copy
  119.            all the files from the A:\CMSTOP directory to the SAMPBLD
  120.            directory.  To build the sample program type at an OS/2
  121.            command prompt:
  122.  
  123.            [C:\SAMPBLD\]nmake cmstop [press Enter]
  124.  
  125.            This will cause the CMSTOP.C program to the compiled, linked
  126.            and messages bound.  The final result is CMSTOP.EXE.
  127.  
  128.    RUNNING THE SAMPLE PROGRAMS
  129.  
  130.    Start Communications Manager on your workstation.  From an OS/2
  131.    full screen or windowed command prompt enter CMSTOP <stop_type>.
  132.  
  133.    The <stop_type> is optional and corresponds to the selections
  134.    on the Exit Pulldown on the Main Menu.  They options are "SOFT"
  135.    and "HARD".  Soft refers to the "Exit when complete" choice,
  136.    while hard refers to "Exit Immediate".  If no stop type is entered
  137.    or the type is not recognized, then soft is defaulted.  If the
  138.    stop_type begins with an 'H' then an Immediate Stop is sent.
  139.  
  140.    A successful return means that the stop has been accepted,  not that
  141.    the stop has occurred.  This is necessary so that a user can enter
  142.    a hard stop if the soft stop does not complete.  An unsuccessful
  143.    return will display an error to the screen.
  144.