The biggest difference is that you should never, ever, ever, ever, pass an object that is subject to change between builds or compiler versions across dll boundaries. Most especially standard library objects!
Even compiler flags such as whether it is a debug build or not can blow you up, because the object you pass may end up not being the object the dll was built to expect. That might even by why you're crashing (without seeing any code or knowing really what's going on of course).
Also, if you're switching as in a switch statement, and you're testing against strings - it's just comparing pointers cast to integers, not the string itself.