home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a108 / 6.ddi / SAMPLES / SPLUS / SP_FREE.PRG < prev    next >
Encoding:
Text File  |  1993-09-09  |  1.2 KB  |  58 lines

  1. * Test code for Schedule+ FreeBusy function.
  2.  
  3. * load the FLL.
  4. SET LIBRARY TO foxmapi.fll
  5.  
  6. * start a mapi session.
  7.  
  8. hmapisession = 0
  9. retval=mplogon(0, "", "", 3, 0, @hmapisession)
  10.  
  11. * create cursors for recipients.
  12.  
  13. =mpcursor("MapiRecip")
  14.  
  15. * clear reciepient cursor and set initial values.
  16.  
  17. SELECT mapirecip
  18. SET SAFETY OFF
  19. ZAP
  20. SET SAFETY ON
  21. APPEND BLANK
  22.  
  23. REPLACE reserved WITH 0
  24. REPLACE recipclass WITH 0
  25. REPLACE eidsize WITH  0
  26. REPLACE entryid WITH  ""
  27.  
  28. * Call MPResolve to fill in MapiRecip with details
  29. * for user Chriscap.
  30.  
  31. retval=mpresolve(0, 0, "Chriscap", 9, 0, "MapiRecip")
  32. WAIT WINDOW "The MPResolveName  code is " + STR(retval)
  33.  
  34. * Begin schedule+ session.
  35.  
  36. hsession = 0
  37. retval=spbegin(0, 0, 0, 0, @hsession)
  38.  
  39. lpszhaveinfo=""
  40.  
  41. * Fill FreeBusy array for user Chriscap for June 1993.  
  42.  
  43. retval=spfreebusy(hsession, 0, 1, "MapiRecip", "1993/06", 0, 0, @lpszhaveinfo, "FreeBusy")
  44. WAIT WINDOW "return from SPFreeBusy = " + STR(retval)
  45. ? freebusy[1]
  46. ? freebusy[2]
  47. ? freebusy[12]
  48. ? freebusy[13]
  49. ? freebusy[16]
  50.  
  51. * End session and logout.
  52.  
  53. retval=spend(hsession, 0, 0, 0)
  54. retval=mplogoff(hmapisession, 0, 0, 0)
  55.  
  56. SET LIBRARY TO
  57.  
  58.