Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

MAPI programming?

 [1/2] from: gavin:mckenzie:sympatico:ca at: 3-Sep-2001 15:01


Folks, Has anyone tried programming against MAPI with the external library features of View/Pro or Command? I've got a task involving my Outlook Calendar that I'd like to solve using REBOL, but I'm hoping that someone has already tried MAPI with REBOL and can comment. I know that this would be straightforward in VB, but I've never been a VB-er and I'm not about to start now. I'm concerned too that I'm going to run into trouble trying to find a way to use MAPI in a non-COM manner -- which is how I assume I'm going to need to do it -- REBOL talking to COM? Nahhh, right? I need to be talking to the non-COM-wrapped DLL entry points, right? Anyway, as you can tell, I'm in the primordial stages of trying to figure out how to do this. Any thoughts ranging from "are you nuts?" to "oh yeah, done that been there" are welcome. Gavin.

 [2/2] from: doublec::acc::co::nz at: 4-Sep-2001 9:43


I've always found MAPI programming to be one of the more confusing aspects of Windows programming. That probably explains why just about everyone uses a pre-built control to do the work. There are three MAPI apis you can use: 1) Simple MAPI 2) Common Messaging calls (CMC) 3) CDO The first two have C interfaces rather than COM so they'd probably be a better choice. You're more likely to find documentation and examples on 'Simple MAPI' so that might be a better option. The MSDN has some examples on how to use it. According to the MSDN, you need to load the libraries and get the procedure addresses for the functions: hlibMAPI = LoadLibrary("MAPI32.DLL"); // 32 bit clients ... lpfnMAPILogon = (LPFNMAPILOGON) GetProcAddress (hlibMAPI, "MAPILogon"))) It goes on with examples for sending/receiving messages, etc. What is the task you are trying to do? Chris. -- http://www.double.co.nz/dylan