I'm creating an Outlook 2003 / 2007 Add-In in VC++ using VS 2005. I've been referencing
these two excellent Code Project articles, but I want to go a little deeper...
Though I'm a seasoned developer, I've been away from C++ and COM / Automation for a while. I need a book / website that I guess I would describe as intermediate-level; more than an "Introduction to VC++" but less than "ATL Internals" (which is a great book but is just a little over my head).
I want to know things like:
-- When I use an #import statement, what is raw_interfaces_only doing? Do I need it for my plugin (it's used in the example code in the articles I mentioned above)? Why?
-- How can I avoid calls like HRESULT hr = Session->get_Folders( &Folders );
And instead just call Folders = Session->Folders;
More like a normal VC++ app.
-- What if I'm trying to #import a file that's not on the user's computer? I.e. can I detect if they have Outlook 2003 installed vs. Outlook 2007 and #import accordingly?
-- When do I use a CComPtr and when do I use a CComQIPtr??? Can I get by without using them at all?
-- In what ways can VS 2005 help me to generate code for my add-in? Do I really have to modify the sink map and COM map by hand to add event sinks?
BTW no I don't want to use VB and no, I don't want to use C# or the CLI.
Thanks in advance for any help or advice. :D
(I'm willing to bet it's internally more complex than just handing over a known memory address, hence the need for a result, and the use of the get_ convention. If it was a .NET library you could just reflect it and find out what was going on!)
I say this as someone that slams into the performance limitations of the CLR and whose team uses a fair amount of unsafe code and C++/CLI to get around them.
I'm not familiar with office automation since VBA for Access in 96-97. So maybe the .NET hooks suck ass, I wouldn't know. But since COM is such a general hellhole in comparison, and MS is so into .net, that would also surprise me.
posted by flaterik at 11:09 PM on June 14, 2007