I am sorry I don't really have time today to get into it. Basically what you want to do is start a new DLL (Win32 Dynamic-Link Library)project in C++ (I am assuming VC++ here). Once you get project started you want to copy over the functions... well there is more to it than that.
Tell you what, start with this tutorial, it will help you understand
the process.Once you are done there, we can begin to work that code over to a dll.
What you will probably have to do is make a "wrapper" set of function for the dll, to know exactly how to export the functions I need to study the source a little better.
Once you are done with the tutorial and think you have a basic handle on how to make a dll bump this and when I get off work I will see if I can take a look.
Maybe someone who has a little more experience with this (I have not done it in about 2 years... and even then only once or twice) can chime in.