and exe and a dll are different Project types. You'll need to create a DLL project and copy the relevant code into the DLL.