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

  1. * Test code for Schedule+ Meeting functions.
  2.  
  3. * load the FLL.
  4.  
  5. SET LIBRARY TO foxmapi.fll
  6.  
  7. * start a MAPI session.
  8.  
  9. hmapisession = 0
  10. retval=mplogon(0, "", "", 3, 0, @hmapisession)
  11.  
  12. * Find first meeting.
  13.  
  14. lpszmesgid=""
  15. retval=mpfindnext(hmapisession, 0, "IPM.Microsoft Schedule.MtgReq", "", 0, 0, @lpszmesgid)
  16. WAIT WINDOW "The MPFindNext  code is " + STR(retval)
  17.  
  18. * Read meeting into cursors.
  19.  
  20. retval = spreadmeet(0, 0, lpszmesgid, 0, 0, "SPlusMesg", "", "MapiRecip", "", "", "SPlusAppt", "", "SPlusAttd", "MapiAttd")
  21. WAIT WINDOW "return from SPSaveMeet = " + STR(retval)
  22.  
  23. IF retval = 1001
  24.  
  25.     * Replace text and save meeting.  Setting lpszItemID to an empty
  26.     * string will cause schedule+ to create a new appointment rather
  27.     * than updating the one read above.
  28.  
  29.     SELECT splusappt
  30.     GOTO TOP
  31.     REPLACE splusappt.text WITH "Hello from foxprow"
  32.     lpszitemid = ""
  33.  
  34.     retval=spsaveappt(hsession, 0, "MapiRecip", "SPlusAppt", "SPlusAssoc", "SPlusAttd", "MapiAttd", 0, 0, lpszitemid)
  35.     WAIT WINDOW "return from SPSaveAppt = " + STR(retval)
  36. ENDIF
  37.  
  38. * Logout of MAPI.
  39.  
  40. retval=mplogoff(hmapisession, 0, 0, 0)
  41.  
  42. SET LIBRARY TO
  43.  
  44.