If you have not fixed it, do this.
C++ encodes the return and argument types into the function name, so when you export it to the DLL, it has a strange name. You need C export to avoid this name mangling.
You also need the same calling convention. This is what the
CALLBACK
does, and you must export with this too (or get rid of it from your definition of
LPFNDLLFUNC1
.
Make it like this:
extern "C" void CALLBACK SetBcrPreset(int Unit, int Preset) {
InternalSetBcrPreset(Unit, Preset);
}
void InternalSetBcrPreset(int Unit, int Preset) {
}