creating .dll files in c++

On page 54 this guide http://www.maths.manchester.ac.uk/~ahazel/EXCEL_C++.pdf gives an example of creating a dll file of a simple function.

Then with this dll file using it in an excel file. I am using excel 2010 and visual basic express 2010, everything goes well for me until I use the function and get a #value error in excel.

I can't work out where i am going wrong any sugestions?
Did you compile the example given or did you make up your own?
Yes I compiled the example provided. The only difference was i had to create a .def file as a template was not provided and then specify the file name of the .def file in project properties->configuration properties->linker->imputs-> module diffinition file . Also I used my own file path for the compiled .dll file in the VBA code
I have a 64 bit version of excel and apparently the visual studio 2010 express compiler deals with dll for 32 bit applications. Does this sound right? is this maybe why its not working?
Topic archived. No new replies allowed.