Hi,

I am working with an Outlook add-in, and I can't figure out how I can
convert the EntryID that gets returned by the MAPI so it can be used in
Outlook to find an item.

I get the pointer to the msg item using the IMsgStore::OpenEntry
function, which I can work OK, then make a call to get the Entry ID
property using the GetProps call, which returns the values that I want,
but I can't figure out how to convert the TSBinary returned by MAPI to a
widestring that is used in Outlook?

Some rough code is below that I am using for testing. But the conversion
from the TSBinary to a WideString evades me completely.

var
  MyEntryID: TSBinary;
  myProps: TSPropTagArray;
  PmyProps: PSPropTagArray;
  NoofProps: Integer;
  MyPropArray: PSPropValue;

begin

      myProps.aulPropTag[0] := PR_ENTRYID;
      myProps.cValues := 1;
      PmyProps := @myprops;
      MyResult := pmsg.GetProps(PmyProps, 0, NoofProps, myPropArray);
      if MyResult = S_OK then
      begin
MyEntryID := myproparray.Value.bin;

      end;
 end;

>Regards
>Jason Coley
>Manawatu Software Solutions
>http://www.software-solutions.co.nz
<http://www.software-solutions.co.nz/> 

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"

Reply via email to