C ++ classes do not cross DLL boundaries very well. DLLs and EXEs must be built using the same compiler and version — preferably together. This is due to the fact that features of the class implementation, such as vtbllayout / order, as well as implementations of some standard library functions (i.e. std::string), are not portable. Various compiler compilation schemes also cannot be used for compilers / versions. The only interface that you can reliably expose outside the boundaries of the DLL is the C interface.
Since I do not know the exact scenario, I cannot be sure, but you are probably referring to some type of undefined behavior on the border of the DLL.
EDIT: it is also possible that at some point the DLL unloaded, which led to the call of nonexistent code in B.