Do you compile the file as a C file? If not, are you using "extern "c"" to avoid the c++ name mangling?
extern "C"
{
DLL_EXPORT LRESULT CALLBACK CBTProc(int code, WPARAM wParam, LPARAM lParam)
{
// my code here.
}
}
If this still does not resolve your problem, go look inside the .def file what is the real name for the exported function. In my experience, CALLBACK functions are always exported with "@16 " at the end, for example:
CBTProc exported as CBTProc@16
and so on.