Since you refer to the pow function, you have to add the following preprocessor statement after all other include statements at the beginning of the file:
#include <math.h>
The final step is to build the DLL. When you build it, you register the COM procedure with the Windows registry.