Showing posts with label Google Desktop. Show all posts
Showing posts with label Google Desktop. Show all posts

Thursday, September 20, 2007

Developing Hybrid Gadgets for Google Desktop

If you are interested in developing gadgets for Google Desktop you may have heard of so-called hybrid gadget. It is a way to enhance your gadget with functionality that cannot be achieved in pure script and GD's API. Namely, you may write the part of the functionality, natively, as an ActiveX object and use it from the script without a need of having the typelib registered, etc.

If you would like to learn about this technique, I encourage you to read my article I have written for Google Developer Knowledge Base which is called Going Beyond Script: Developing Hybrid Gadgets. I hope you will enjoy it and that the article will prove useful. Feel free to leave here comments regarding the article.

Thursday, August 02, 2007

New version of MultiDesktop & Google Desktop hybrid gadgets

Yesterday, I have released on my website new version of my Google Desktop gadget called MultiDesktop. The aim of a gadget is to provide the user with possibility of having multiple virtual desktop (feature well-known to those of you who are or used to be Linux users). Unlike other software of this type it does not limit the user to 4 desktop and each desktop may have its name to easily identify them. In the new version, created desktops are kept between sessions and there is no need to re-create desktops each time you reboot your computer. For full list of features visit MultiDesktop web page.

How did I develop MultiDesktop?

At the first glance, MultiDesktop may appear to be standard simple Google Gadget. It is packaged inside the .gg file like other gadget. It is a standard format for distributing Google Gadgets. It is nothing more than ZIP file containing XML file specifying the static presentational aspects of gadgets, jscript source code defining its dynamics and plenty of resource files with graphics and internationalized text strings. For more details visit Google Desktop SDK page.

However, in case of MultiDesktop, JScript is used only to build the GUI and front-end to the engine written in C++. It is possible to be done in Google Desktop due to what Google calls hybrid gadget. You can write a DLL library being a COM server, attach it to the Gadget and then instantiate any object defined that implements an IDispatch interface. It can be easily implemented in Microsoft Visual C++ using ATL library or in Delphi.
Note: Remember to set your version to major = 0xFFFF and minor = 0xFFFF. Otherwise, your hybrid engine will not work. To do so in ATL make sure that you have 0xFFFF as two last parameters of IDispatchImpl class. For example, in case of MultiDesktop it is:


public IDispatchImpl<IMDInternal, &IID_IMDInternal, &LIBID_mdengineLib, /*wMajor =*/ 0xFFFF, /*wMinor =*/ 0xFFFF>,

There were visits to this blog since 20.08.2007.