Solved

How to find the domain name for an MS Exchange server and for a LDAP server using C/C++?

Posted on 2008-06-18
2
3,611 Views
Last Modified: 2013-12-19
I'm new to Windows programming.  I'd like to use a C/C++ program to find the domain names of the local LDAP active directory server and the local MS Exchange server without knowing the addresses or names of the servers.  What are some ways to retrieve that information?  Thanks.
0
Comment
Question by:vsee
2 Comments
 
LVL 70

Accepted Solution

by:
Chris Dent earned 125 total points
ID: 21824187

There are a couple of issues that need to be addressed.

You can't connect to something you know absolutely nothing about. So you would have to be able to determine what you were connecting to prior to into a database.

If you're running the program from a member of a domain it will happily let you get on with this because knowledge of the domain and it's services has been defined by that membership.

If you have nothing to do with the domain you would have to know or find a server with an LDAP service listening.

Once you've got that far you can query the RootDSE node for some basic information about the LDAP directory (LDAP://Server/RootDSE) then work down into the Configuration and dig out Exchange information.

That brings us onto the next issue. The information above isn't available to unauthenticated users, you must be able to log onto the domain. If you can do that you must know enough about the domain to skip the first stage anyway.

Chris
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now