In addition to the other post, maybe some help comes from Inline::CPP, which (somewhat) transparently allows you to import and access C++ objects from within Perl. On my todo-list, I have a project to venture into instantiation and handling of COM objects (starting from IUnknown), and as long as perls memory management is reference-count based instead of garbage collcetion based, COM objects could almost transparently fit into Perl. But there are many MAPI pitfalls, as MAPI uses its own memory allocator (MAPIFree() must be called to deallocate structures returned by MAPI), so implementing access to real MAPI (instead of Simple MAPI) won't be easy from Perl - but Perl would be the first language to make real MAPI a nice thing to access.

After you have managed this part, there comes another tricky part - COM callbacks into Perl. perl itself currently isn't reentrant and Perl native threads are labeled experimental for a reason. A good idea might be to implement a wrapper that exports MAPI structures via a TCP/IP port and access that gateway from Perl then - perlfunc:select is a well-understood solution to nonblocking waits.

A small note : Perl already allows access to OLE2 objects, which export a list of callable methods. This is not what COM is about - Inline::CPP would/could allow access to VTable-interfaces, which would make using almost all COM-interfaces possible.

perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web

In reply to Re: Using MAPI with Exchange by Corion
in thread Using MAPI with Exchange by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.