Solved

How determine "Fully Qualified Domain Name" from domain name?

Posted on 2004-08-06
3
304 Views
Last Modified: 2013-12-19
Hello

How can I determine "Fully Qualified Domain Name" from domain name using Windows API?

Thanks.
0
Comment
Question by:wajszle
3 Comments
 
LVL 37

Accepted Solution

by:
Bing CISM / CISSP earned 125 total points
ID: 11737733
// Check if <<name>> is a fully qualified domain name
//
// Returns |true| if the name contains at least one dot and other
// characters around that dot.

bool
HostInfo::isfqdn (const char *name)
{
    bool seendot = false;
    bool seenpre = false;
    bool seenpost = false;

    for ( ; name && *name && !seenpost; ++name)
        if (! seendot && *name != '.')
            seenpre = true;
        else if (seenpre && *name == '.')
            seendot = true;
        else if (seendot && *name != '.')
            seenpost = true;

    return seenpost;
}
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Greetings, Experts! First let me state that this website is top notch. I thoroughly enjoy the community that is shared here; those seeking help and those willing to sacrifice their time to help. It is fantastic. I am writing this article at th…
This article is in response to a question (http://www.experts-exchange.com/Networking/Network_Management/Network_Analysis/Q_28230497.html) here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 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

20 Experts available now in Live!

Get 1:1 Help Now