So how is querying the AD Server part of CR?
Way not enough info, need more decription of what you are doing and why and what are you connecting too? Possible BOE Server and trying to get a list of Users, but that's just a guess.
And 10.5 does not support querying BOE Server so I thinkn this is simply a Windows VS 2008 question. You may want to post to MSDN forums.
Don