Basically I need to connect to multiple groupwise domain paths at the same

If I only connect to one, no errors.
If I connect to one, do my stuff, then connect to another with the same
variant, errors during runtime.
If I try any other variation that requires connecting to multiple domain
paths, I either get an error during runtime or an access violation

What is the trick to connecting to multiple domains in the same program at
the same time?