home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / dax1.exe / DAP / DAP016.C < prev    next >
Text File  |  1992-07-15  |  4KB  |  96 lines

  1. //   ╔════════════════════════════════════════════════════════════════════╗
  2. //   ║                                                                    ║
  3. //   ║ module:      dap016.c                                              ║
  4. //   ║ abstract:    This module contains DAP request 1016                 ║
  5. //   ║                                                                    ║
  6. //   ║ environment: NetWare 3.x v3.11                                     ║
  7. //   ║              Network C for NLMs SDK                                ║
  8. //   ║              CLib v3.11                                            ║
  9. //   ║              Network C for DOS v2.0                                ║
  10. //   ║              NetWare C Interface DOS v1.2                          ║
  11. //   ║                                                                    ║
  12. //   ║  This software is provided as is and carries no warranty           ║
  13. //   ║  whatsoever.  Novell disclaims and excludes any and all implied    ║
  14. //   ║  warranties of merchantability, title and fitness for a particular ║
  15. //   ║  purpose.  Novell does not warrant that the software will satisfy  ║
  16. //   ║  your requirements or that the software is without defect or error ║
  17. //   ║  or that operation of the software will be uninterrupted.  You are ║
  18. //   ║  using the software at your risk.  The software is not a product   ║
  19. //   ║  of Novell, Inc. or any of subsidiaries.                           ║
  20. //   ║                                                                    ║
  21. //   ╟────────────────────────────────────────────────────────────────────╢
  22. //   ║ maintenance history:                                               ║
  23. //   ║ level    date      pi   description                                ║
  24. //   ╟────────────────────────────────────────────────────────────────────╢
  25. //   ║  001   02/21/92    kl   initial release.                           ║
  26. //   ╚════════════════════════════════════════════════════════════════════╝
  27.  
  28. #include    "dap/dapsys.h"
  29.  
  30. //
  31. //  The following are the request/reply structures for the Reset calculator
  32. //  DAP.
  33. //
  34.  
  35. typedef struct{                         // reset calc request pkt
  36.         SINT32      nothing;            // unused
  37. }RCRequest;
  38.  
  39. typedef struct{                         // reset calc reply pkt
  40.         SINT32      memory;             // the stored value
  41. }RCReply;
  42.  
  43. #if !defined(ENGINE)
  44.  
  45. //
  46. //  Following is the Client-Side API for Reset calculator
  47. //
  48. //      DAPid     - this is obtained from DAPInitialize.  It is
  49. //                  normally a pointer to some sort of structure
  50. //                  containing info needed to connect to the server.
  51. //
  52. //      memory    - the stored value
  53. //
  54.  
  55. T_RC    DAPResetCalculator(DAPDATA *DAPid, long *memory)
  56. {
  57.         T_RC        rc;
  58.         RCReply     *reply   = (RCReply *)DAPid->dapReply.data;
  59.         //
  60.         //  Send the request
  61.         //
  62.         if( (rc = DAPSendRequest(DAPid,DAPRESETCALCULATOR)) == 0){
  63.             //
  64.             //  Copy result 
  65.             //
  66.             *memory = reply->memory;
  67.         }
  68.         return rc;
  69. }
  70.  
  71. #else   // !defined(ENGINE)
  72.  
  73. //
  74. //  Following is the Server-Side API for Reset calculator
  75. //
  76.  
  77. void    DAPResetCalculator(DAPDATA *DAPid)
  78. {
  79.         RCReply *reply = (RCReply *)DAPid->dapReply.data;
  80.         DIAG4("Inside ResetCalculator DAP");
  81.         //
  82.         //  Do the work
  83.         //
  84.         reply->memory = DAPGetApplDataStructure(DAPid).mailBox001;
  85.         //
  86.         //  Set the DAP return code
  87.         //
  88.         DAPid->dapReply.returnCode = 0;
  89.         //
  90.         //  Now send the result to the client
  91.         //
  92.         DAPEnqueueServiceReply(DAPid);
  93. }
  94.  
  95. #endif  // !defined(ENGINE)
  96.