Search Wiki:
Resource Page Description
SEHE is an example of how to use the Skype API. The full C# project, including source code, and heavily commented is available for download.

SEHE was built using Microsoft Visual C# 2008 Express Edition - C# 3.0 .NET 3.5(SP1) both the latest versions from Microsoft. Showing how to deploy and auto-update from web servers using Microsoft ClickOnce technology.

It uses the COM component Skype4COMLib.dll provided by Skype as the interface. SEHE utilizes registration free installation of this .dll as well.

SEHE supports all current API and Skype4COM methods and also provides a command interface to enter API commands for Skype on the Fly for testing.

Full API message and event logging is supported.

SEHE also shows how to use Registration Free installation of carrying the Skype4COMLib.dll in your project and not needing to register the Skype4COMLib.dll.

SEHE also is built using ClickOnce deployment and automatic-updates technology. So SEHE will always be up to date automatcially. not requiring any setip project or 3rd party installed to provide these services.

SEHE logs ALL Skype events produced from both the raw API as well as Skype4COMLib.

SEHE show you how to start Skype, as well, if it is not already started, and has many switches so you can experiment with the Skype API and Skype4COM methods, with no learning time required up-front. SEHE will save you many hours of debugging, testing and educate you quickly on the proper methods to use to interface to Skype.

SEHE has two display modes one shows just Skype4COMLib events and one shows raw API events with a command Window as well. So you can enter API commands in real-time to see how you will need to code your program, if you are using the raw API.

You can also add your code inside the event handlers already in place in SEHE projects created from the template to instantly see what your code will need to do and support when you build your real project. So, as you can see SEHE has many possible uses.

SEHE Display: API Command Window and Skype4COM Events.

APIWindowNotHidden.JPG

SEHE Display: Skype4COM events only, API window hidden.

APIWindowHidden.JPG

SEHE shows how to deal with Skype client attachment as well as Skype program authorization and will even prompt users with a web page using their default browser to download Skype if the Skype client is not found on the users computer.

SEHE is a great test tool, to run along your application if needed as a sanity check, to see what events are really being fired from the Skype client that your application maybe missing.

SEHE also is a great way to quickly test code prior to building your program or application, since all the Skype interface code for all events is already present in SEHE, it allows you to start using the Skype API right away, and play with what your application will do with the Skype API and SKype4COMLib, before it is even created.

SEHE uses TheNotifyIconExample logic for control of NotifyIcon, Taskbar dipslay, ContexTextMenuStrip assigment, sharing and display for Form1 and NotifyIcon. Mouse Click assignments, left and right, single and double for Form1 and NotifyIcon:

SEHE starts with Form1 displayed normal, not minimized.
A NotifyIcon for SEHE is displayed.
A Taskbar entry is displayed when SEHE is being displayed normally.
A Taskbar enter is not displayed when SEHE is minimized.
SEHE does not honor exit requests from the SEHE Form1 window using the "X".
SEHE displays a warning NotifyIcon Balloon Tip, when this type of Exit is attempted and SEHE minimzes to the System tray.

Single Right Mouse Clicks on the NotifyIcon of SEHE will display a contextMenuStrip.
Single Right Mouse Clicks on the SEHE Form window will display the same contextMenuStrip as NotifyIcon.
Single Left Mouse Clicks on the NotifyIcon of SEHE will toggle between displaying the SEHE window and minimizing it.
Double Left Mouse Clicks on the SEHE Form window will toggle between displaying the SEHE window and minimizing it.

All of the above functionality was provided using no code in SEHE simply selecting these choices using Visual Studio Project User Settings and the TheNotifyIconExample Project Template.

TheNotifyIconExample is in the MSDN code gallery as well.

More information can be found here about TheNotifyIconExample, Click Here

SEHE can be installed using Microsoft ClickOnce technology from here: Click Here

A Visual Studio C# Project Template that allows you to create Projects with SEHE in them at creation time , so you can be testing many things at one time, can be installed from the download page Click Here Note: Do NOT redistibute any projects with SEHE logic.

SEHE projects created from the template will not build if the Skype4COMLib.dll is not registered on your system. A .bat file to register and unregister Skype4COMLib.dll is included on the download page here as well as the latest Skype4COMLib.dll.

SEHE has links on the SEHE for ALL API and Skype4COM documentation, a Link back here to the MSDN code gallery, as well as a link for help in the Skype Forum for SEHE.

Full Project Source can be downloaded after installing SEHE using the ClickOnce link above, by clicking the SEHE Link at the top of SEHE "Click For Help With This Program".

SEHE can be removed at anytime via control panel and add/remove programs.

Last edited Dec 3 2008 at 1:26 AM  by TheUberOverLord, version 17
Comments
hogan wrote  Aug 16 2009 at 8:02 PM  
I just tried to add event handler that writes thread id on SilentMode change. Then i changed SilentMode and wrote my program thread id. They are different. That means you have to have synchronization in event handlers, which you do not have, so there is chance in your application for concurrency problem.
The code is

static Skype skype = new Skype();

static void Main(string[] args)
{
skype.SilentModeStatusChanged += new _ISkypeEvents_SilentModeStatusChangedEventHandler(skype_SilentModeStatusChanged);
skype.SilentMode = true;
Console.WriteLine(Thread.CurrentThread.ManagedThreadId);
Console.ReadKey();
}

static void skype_SilentModeStatusChanged(bool Silent)
{
Console.WriteLine(Thread.CurrentThread.ManagedThreadId);
}

ZOverLord wrote  Oct 7 2010 at 7:08 AM  
You will need to manage your threads, Skype4COM is STA, so.... Not sure, why you would even need to be using threads, since Skype4COM is event driven anyway?

Updating...
Page view tracker