Understanding Wine
DLL and Service Development in Wine
»Wine HQ

The following tutorials introduce COM development in Wine. The tutorials:

  • Develop a simple COM object providing a counter to clients

  • Detail for new Wine developers how this object and corresponding client code can be integrated into Wine for execution on top of Linux or Unix

  • Discuss for new COM developers the foundation COM techniques needed to understand the examples and develop new basic COM services

New COM developers working in a Windows environment will also benefit from these tutorials. The code presented in this tutorial is fully compatible and tested under Windows using the compiler suite distributed with the Microsoft Visual C++ Express and the Microsoft Platform SDK. Windows developers may want to begin with the last tutorial that explains how to build and run these examples in Windows.


Setting Up Tutorial Code in Wine

Describes integrating the tutorial code into Wine.

Developing a COM DLL

Introduces basic COM development. This includes working with an IDL, registering and unregistering new DLLs, general DLL structure, class factories, and the actual code for a basic COM object. This tutorial also discusses how to integrate a new DLL and test application into the Wine build system.

Developing a COM Service

Modifies the DLL developed in the first tutorial to execute as a stand alone executable server and then as a Windows service. This tutorial also reviews how to control services in Wine.

Running a DLL as a Service with svchost

Describes running a DLL as a service by wrapping it in an instance of svchost by merging the COM DLL and COM Service developed in the earlier tutorials. This tutorial also describes the registry entries that must exist for

Migrating from Linux to Windows

Demonstrates how to build and execute the above tutorials in Windows. This is important for Wine developers who must test for Windows compatibility, and for Windows developers that are not using Wine.

Code For the Tutorial

Tutorial source code is available as a a tarball or a zip file:

A great deal of information exists on the web describing Wine and COM. Some of it is better than others. A collection of articles that I found useful are available on the links page.

General Notes

These are personal notes resulting from my work with COM and Wine. New developers may want to flip through these pages for short topic specific discussions ranging from installation of Visual Studio Express to using git with Wine.