Monday, November 19, 2012

Skype for Outlook (by the community, with C/C++ source)

CodeProject - Outlook add-in integrating Skype

We're all working with a variety of tools every day; we communicate using a number of instant messaging applications (Skype and Yahoo for me); we deal with many emails per day using our favorite client (mine being Outlook), and we're dealing with other tons of data for doing tracking activities, doing searching and so on.

But despite this overwhelmingly increasing data, there is little interoperability between all of these programs. I know, I know, everything is in the cloud as everyone tries to sells this to us every day. But the clipboard and Alt-Tab remains the main staples of day-to-day working. I would like to set a task as completed or to assign a task directly from the email received from JIRA. There may be such add-ins on market (and for Skype there are for sure), but without source code.  

The main purpose of this article is to embed Skype functionality directly in Outlook. This is not a fully Skype client embedded (it demonstrates just a number of get/set properties and events), but it can be a good demonstration of Skype Desktop API combined into an Outlook add-in.

There are also two other purposes:

- describe how to create a COM component in plain C (the general steps)

- demonstrate how to implement an Outlook add-in without wizards  

For the impatient: how it looks like  

image

Note. Not all controls are working; some of them are for illustration purposes only. The reader will discover in code which ones are just for showing.

Background  

The familiarity with Skype Desktop API would help in order to understand what the add-in does in order to interact with Skype.

In short, there are 3 phases for an external application to talk to Skype:

- discover Skype and establish connection (SkypeControlAPIDiscover, SkypeControlAPIAttach)

- user confirmation in Skype to allow external application interaction

- WM_COPYDATA based data exchange with Skype following the protocol described in the Skype Developer documentation.

Knowledge of Win32, COM, Outlook object model and C programming are required for a better understanding of this article.  

..."

Seeing this was one of those, "Wow, why don't we yet have this from Microsoft yet?" moments. Now the code in this project is all C/C++ so not much for the Managed Dev, and this doesn't use the new and shiny new Office App model, but I still thought this pretty interesting and cool.

No comments: