Recently I came across Windows Live Photo Gallery which is an easy-to-use photo management tool available for free from Microsoft. This tool has a number of features that makes it a convenient tools to use for managing photos. The feature that caught my eye, and the subject of this article, is the support for 3rd party developer plugins.
This article is intended to be a tutorial to help developers get a basic plugin built without having to try to reverse engineer the sample application that Microsoft has provided as part of their documentation. This article is not intended to be a full tutorial of how Photo Gallery plugins work. For that, please see the documentation (it looks pretty decent).
- Install Windows Live Photo Gallery
- Create a .Net class library project in Visual Studio
- Reference C:\Program Files\Windows Live\Photo Gallery\Microsoft.WindowsLive.PublishPlugins.dll (or wherever Photo Gallery was installed to, Program Files (x86) for 64 bit OS).
- Reference System.Windows.Forms.dll (in the GAC)
- Create a class that implements Microsoft.WindowsLive.PublishPlugins.IPublishPlugin
- Compile the dll
- Register the plugin. Copy the following text into a .reg file, update the names, then run it (or open the Registry Editor and edit the keys manually).
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Live\PublishPlugins\My Plugin]
"AssemblyPath"="C:\\My Path\\MyPlugin.dll"
"ClassName"="MyNamespace.MyClass"
"FriendlyName"="My Plugin"
"IconPath"="C:\\My Path\\MyPlugin.dll,-32512"
NOTE: If you are running a 64 bit OS the registry key should be [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows Live\PublishPlugins\My Plugin]
- To debug, set the Start Action (project properties –> Debug) to “Start external program” and set the value to C:\Program Files\Windows Live\Photo Gallery\WLXPhotoGallery.exe (or wherever Photo Gallery was installed to, Program Files (x86) for 64 bit OS).
You should be able to run the plugin within Photo Gallery by going to Publish -> More Services -> My Plugin.
From here you should be able to follow the documentation to make your plugin interesting. Good luck!