Check out my article Creating a simple DLL