[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 657
  • Last Modified:

Opening an attachment

Hi

I'm trying to read a MAPI-attachment with VC4.2
I've read in the help "Opening an Attachment" and it says:

1. Call the message's IMessage::GetAttachmentTable method to access its attachment table.
2. Call HrQueryAllRows to retrieve all rows in the table.
3. For each row:
 a. Open the attachment by passing the attachment number represented in the PR_ATTACH_NUM etc....

What I wonder is how do I get PR_ATTACH_NUM out of the Rows in the table? I have found nothing about this in the helpfiles, nor have I found some sample code.

Hope you can help me

Regards,

Andreas
0
cost
Asked:
cost
1 Solution
 
strobertCommented:
each row returned by HrQueryAllRows is basically a list of SRow's
(you actually get a SRowSet which has an array of SRow's)

each SRow has an array of SPropValue's (SRow.lpProps)

for each SPropValue, serach for the ulPropTag that is PR_ATTACH_NUM, and the Value piece should have the attach num to pass into OpenAttach.

0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now