You must not add functions to a compiled DLL. A DLL is only meant to be called from your program which contains the functions you need.

If you have the DATE definition in your code, then I can not answer why you get error messages indicating that this definition is missing. But it might have other reasons. If you really need to compile the DLL and can't find the problem yourself, you may upload your complete VC++ 2010 project for that DLL, and I'll look into it.