home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ipdssdk.zip / SDK / SAMPLES / ELMO / ELMO_PUC.C < prev    next >
Text File  |  1994-02-08  |  7KB  |  116 lines

  1. /***********************************************************************/
  2. /*                                                                     */
  3. /* COPYRIGHT:                                                          */
  4. /*                                                                     */
  5. /* Copyright (C) International Business Machine Corp, 1991,1994.       */
  6. /*                                                                     */
  7. /* DISCLAIMER OF WARRANTIES:                                           */
  8. /*                                                                     */
  9. /* The following enclosed code is sample code created by IBM           */
  10. /* Corporation.  This code is not part of any standard IBM product     */
  11. /* and is provided to you solely for the purpose of assisting you in   */
  12. /* the development of your applications.  The code is provided         */
  13. /* "AS IS", without warranty of any kind.  IBM shall not be liable for */
  14. /* any damages arising out of your use of the sample code, even if     */
  15. /* they have been advised of the possibility of such damages.          */
  16. /*                                                                     */
  17. /*                                                                     */
  18. /* PROGRAM NAME: <ELMO.EXE>                                            */
  19. /*                                                                     */
  20. /* FILE NAME: ELMO_PUT.C                                               */
  21. /*                                                                     */
  22. /* DESCRIPTIVE NAME: Process utterance complete message for            */
  23. /*                   Elmo's Trusty Dictator                            */
  24. /*                                                                     */
  25. /* STATUS: REVISION 1                                                  */
  26. /*                                                                     */
  27. /*                                                                     */
  28. /* FUNCTION: Contains the function that processes the utterance        */
  29. /*           complete message                                          */
  30. /*                                                                     */
  31. /* NOTES:                                                              */
  32. /*                                                                     */
  33. /*    MODULE STRUCTURE:                                                */
  34. /*                                                                     */
  35. /*     - process_utterance_complete_message                            */
  36. /*                                                                     */
  37. /*                                                                     */
  38. /*   DEPENDENCIES:                                                     */
  39. /*                                                                     */
  40. /*     - elmo.h       Elmo defines                                     */
  41. /*     - smapi.h      IPDS API defines                                 */
  42. /*                                                                     */
  43. /*                                                                     */
  44. /* MODULE TYPE: (C language)                                           */
  45. /*                                                                     */
  46. /*                                                                     */
  47. /* CHANGE ACTIVITY: AS FOLLOWS                                         */
  48. /*                                                                     */
  49. /* FLAG  REASON  RLSE  DATE  ORIGIN   DESCRIPTION                      */
  50. /* ---- -------- ---- ------ ------   -----------                      */
  51. /*               0001 931102 JAF      created                          */
  52. /*                                                                     */
  53. /***********************************************************************/
  54.  
  55. #define    INCL_WIN
  56. #define    INCL_DOS
  57. #define    INCL_GPIBITMAPS
  58. /*---------------------------------------------------------------------*/
  59. /* application system include files                                    */
  60. /*---------------------------------------------------------------------*/
  61. #include   <os2.h>
  62. #include   <stdio.h>
  63. #include   <stdlib.h>
  64. #include   <string.h>
  65.  
  66. /*---------------------------------------------------------------------*/
  67. /* application include files                                           */
  68. /*---------------------------------------------------------------------*/
  69. #include   "elmo.h"
  70.  
  71. /*---------------------------------------------------------------------*/
  72. /* IBM Personal Dictation System api include files                     */
  73. /*---------------------------------------------------------------------*/
  74. #include   <smapi.h>
  75.  
  76. /***********************************************************************/
  77. /* FUNCTION: process_utterance_complete_message                        */
  78. /*                                                                     */
  79. /* PURPOSE : Process the utterance complete message                    */
  80. /*                                                                     */
  81. /* INPUTS  : reply     - reply message                                 */
  82. /*                     - pointer to the instance data                  */
  83. /*                                                                     */
  84. /* OUTPUTS : on error  - displays an error message                     */
  85. /*                                                                     */
  86. /* GLOBALS : NONE                                                      */
  87. /*                                                                     */
  88. /***********************************************************************/
  89. void  process_utterance_complete_message ( SM_MSG reply, PINSTANCEDATA p )
  90. {
  91.   /*--------------------*/
  92.   /* internal variables */
  93.   /*--------------------*/
  94.   int   rc;
  95.  
  96.   /*----------------*/
  97.   /* get the result */
  98.   /*----------------*/
  99.   SmGetRc ( reply, &rc );
  100.  
  101.   /*-----------------------*/
  102.   /* check the return code */
  103.   /*-----------------------*/
  104.   if ( rc != SM_RC_OK ) {
  105.  
  106.     /*---------------------------------------------*/
  107.     /* an error occurred so, post an error message */
  108.     /*---------------------------------------------*/
  109.     ListBoxAddItem ( p->hwndStatusLB,
  110.                      "Received corrupted utterance complete message.",
  111.                      STALISTBOXVISIBLECNT );
  112.   }
  113.   return;
  114. }
  115.  
  116.