.NET access to PR_ATTACH_DATA_BIN

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone have c# or vb.net code which can retrieve the PR_ATTACH_DATA_BIN
property from an IAttachment? Actually, it would be best if there was some
code that could get this value given an Outlook.Attachment.MAPIOBJECT.
 
=?Utf-8?B?YnN0cnVt?= said:
Does anyone have c# or vb.net code which can retrieve the
PR_ATTACH_DATA_BIN property from an IAttachment? Actually, it would
be best if there was some code that could get this value given an
Outlook.Attachment.MAPIOBJECT.

If you're really stuck with .Net, then you'll have to use mapi33.net or
write some C++/Delphi code to do the saving and call that from your .Net
code. Don't forget, as usual, that .Net + exmapi is neither supported nor
recommended by MS, and may crash randomly and unexpectedly at any time.
(see a whole bunch of past threads here and in
ms.public.win32.programmer.messaging)

I think the only OOM solution is to save the attachment to disk and then
read the bytes in from there. It's not efficient, but it'll work.

-- dan
 
Back
Top