Check this Creating a simple DLL