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,615 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 71

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Keyword email search on Exchange 2010 4 42
profile account in outlook problem 3 38
active directory, exhange 12 56
Export email data from Google to PST files 8 64
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
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…

738 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