GetFormRegionStorage

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

Guest

Hi There!

I'm writing a add-in for Outllook, in unmanaged C++ ( crazy I know ) and am
trying to return a form region from my resources. In the doc’s it says:

Return Value:
“A Variant object representing the storage that Outlook has allocated for
the form region. The type of the return value can be: String representing
that the return value is a local path to an Outlook Form Storage (.OFS) file;
Byte() representing that the return value is an array of bytes that contains
the contents of the .OFS file; IStorage representing that the return value is
a COM storage object IStorage (for C++ only); Nothing or Null, representing
that Outlook could not allocate storage for this form region and will not
load the form region.â€

What exactly is a “Byte()†in COM terms? I’ve assumed a COM SafeArray but I
can’t seem to get this working.

If I can’t make a “Byte()†work, how does Outlook use the IStorage
interface? Does it try to open the .ofs file as a named stream within it?

Thank for your help!
 
No offence intended, but that is a less than useful response, particularly
since it is included in the documentation I quoted in the original post.

As it turns out, Outlook is expecting a VARIANT containing a Safearray as
below:

Storage->vt = VT_ARRAY | VT_UI1;
Storage->parray = parray;





Luk said:
It's a byte[]

Jeff Moll said:
Hi There!

I'm writing a add-in for Outllook, in unmanaged C++ ( crazy I know ) and am
trying to return a form region from my resources. In the doc’s it says:

Return Value:
“A Variant object representing the storage that Outlook has allocated for
the form region. The type of the return value can be: String representing
that the return value is a local path to an Outlook Form Storage (.OFS) file;
Byte() representing that the return value is an array of bytes that contains
the contents of the .OFS file; IStorage representing that the return value is
a COM storage object IStorage (for C++ only); Nothing or Null, representing
that Outlook could not allocate storage for this form region and will not
load the form region.â€

What exactly is a “Byte()†in COM terms? I’ve assumed a COM SafeArray but I
can’t seem to get this working.

If I can’t make a “Byte()†work, how does Outlook use the IStorage
interface? Does it try to open the .ofs file as a named stream within it?

Thank for your help!
 
Back
Top