msoutlook.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GetFormRegionStorage

 
Post new topic   Reply to topic    msoutlook.org Forum Index -> Outlook Programs Add-Ins
Author Message
Jeff Moll



Joined: 22 Aug 2007
Posts: 1

PostPosted: Wed Aug 15, 2007 5:20 pm    Post subject: GetFormRegionStorage Reply with quote

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!

Archived from group: microsoft>public>outlook>program_addins
Back to top
View user's profile Send private message
Luk



Joined: 14 Aug 2007
Posts: 1

PostPosted: Tue Aug 21, 2007 10:50 am    Post subject: RE: GetFormRegionStorage Reply with quote

It's a byte[]

"Jeff Moll" wrote:

> 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 to top
View user's profile Send private message
Jeff Moll



Joined: 22 Aug 2007
Posts: 1

PostPosted: Tue Aug 21, 2007 3:16 pm    Post subject: RE: GetFormRegionStorage Reply with quote

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" wrote:

> It's a byte[]
>
> "Jeff Moll" wrote:
>
> > 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 to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Search All tasks I would like to search items from all task folders that I have permissions to(I don't necessarily know the names or where they exist). Is there a way to search just for tasks without recursing through all the folders?

Internet Format of the messages Hi! Something went wrong (I don't know how) on my Microsoft Outlook 2003 (fully patched with SP2 and fixes). In my personal Address Books (3600 addresses), some contacts are wrong with the Internet Format which is "Send using Outlook Rich Text Format" and

kjhkjhkj khjllkjlkj

Outlook Keeps Wanting To Be Configured After I Removed Trial I use Microsoft Office 2003 Basic edition on my Vista Home Edition machine. I had tried out Office 2007 Standard edition a while back and since I never upgraded I removed the trial version off my hard drive using the normal procedure. After I did that eac

undeletable email I have an email in my sent box that I am unable to delete. When I try, I get a message reading "an unknown error has occurred." Anyone?
Post new topic   Reply to topic    msoutlook.org Forum Index -> Outlook Programs Add-Ins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group