Remove the __declspec( dllexport ) and write a .def file instead.
And there are macros to extract the colors from a COLORREF, you don't need your own function.