The error you describe seems as if you try to call the methods of Bus() before Bus().Load("something.dll") or Bus().SetLibName("something.dll") was called. If I'm looking correctly, you only call Bus().Load() inside the loop if openBus == true, while this code is in the else branch.
Uhmmm... I understand what do you mean. It's possible. But using dli, the declared dll functions are loaded by default when the application start. In the program I use Load() function only for change the used library.