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

  1. //   ╔════════════════════════════════════════════════════════════════════╗
  2. //   ║                                                                    ║
  3. //   ║ module:      dap018.c                                              ║
  4. //   ║ abstract:    This module contains DAP request 1018                 ║
  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 Recall Value
  32. //  DAP.
  33. //
  34.  
  35. typedef struct{                         // recall value request pkt
  36.         SINT32      nothing;            // unused
  37. }RVRequest;
  38.  
  39. typedef struct{                         // recall value reply pkt
  40.         SINT32      value;              // the recalled value
  41. }RVReply;
  42.  
  43. #if !defined(ENGINE)
  44.  
  45. //
  46. //  Following is the Client-Side API for Recall value
  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. //      val       - the recalled value
  52. //
  53.  
  54. T_RC    DAPRecallValue(DAPDATA *DAPid,long *val)
  55. {
  56.         T_RC        rc;
  57.         RVReply     *reply   = (RVReply *)DAPid->dapReply.data;
  58.         //
  59.         //  Send the request
  60.         //
  61.         if( (rc = DAPSendRequest(DAPid,DAPRECALLVALUE)) == 0){
  62.             //
  63.             //  Copy result 
  64.             //
  65.             *val = reply->value;
  66.         }
  67.         return rc;
  68. }
  69.  
  70. #else   // !defined(ENGINE)
  71.  
  72. //
  73. //  Following is the Server-Side API for Recall Value
  74. //
  75.  
  76. void    DAPRecallValue(DAPDATA *DAPid)
  77. {
  78.         RVReply *reply = (RVReply *)DAPid->dapReply.data;
  79.         DIAG4("Inside RecallValue DAP");
  80.         //
  81.         //  Do the work
  82.         //
  83.         reply->value = DAPGetApplDataStructure(DAPid).mailBox001;
  84.         //
  85.         //  Set the DAP return code
  86.         //
  87.         DAPid->dapReply.returnCode = 0;
  88.         //
  89.         //  Now send the result to the client
  90.         //
  91.         DAPEnqueueServiceReply(DAPid);
  92. }
  93.  
  94. #endif  // !defined(ENGINE)
  95.