If the problem is access, I suggest you create a new user which has access to the domain server, and launch (runas) the application with that uid.
The error you referenced doesn't strike me as something that indicates an access error, however. If you want more help, you should provide more information (paste the surrounding code).
Also, this forum is meant for C++ language questions, not general technology discussions (even though C++ is used). There are specific network newsgroups at http://msdn.microsoft.com/newsgroups, which may prove more helpful.