Click here to Skip to main content
15,893,486 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Help with selecting Visual Studio option Pin
David Crow6-Nov-08 5:05
David Crow6-Nov-08 5:05 
AnswerRe: Help with selecting Visual Studio option Pin
Joe Woodbury6-Nov-08 12:47
professionalJoe Woodbury6-Nov-08 12:47 
AnswerRe: Help with selecting Visual Studio option Pin
Saurabh.Garg6-Nov-08 15:24
Saurabh.Garg6-Nov-08 15:24 
GeneralRe: Help with selecting Visual Studio option Pin
Geurt Bloem6-Nov-08 20:49
Geurt Bloem6-Nov-08 20:49 
GeneralRe: Help with selecting Visual Studio option Pin
Saurabh.Garg6-Nov-08 21:11
Saurabh.Garg6-Nov-08 21:11 
QuestionResolving hostnames in a domain Pin
Green Fuze6-Nov-08 1:23
Green Fuze6-Nov-08 1:23 
QuestionRe: Resolving hostnames in a domain Pin
led mike6-Nov-08 4:25
led mike6-Nov-08 4:25 
AnswerRe: Resolving hostnames in a domain Pin
Green Fuze6-Nov-08 6:12
Green Fuze6-Nov-08 6:12 
Right Smile | :)

So, I have the following code:
<br />
std::wstring host(_T("subdomain1.SubDomain.MainDomain.com"));<br />
<br />
DNS_RECORD* pDnsRecords;<br />
DNS_STATUS stat =  DnsQuery(host.c_str(),<br />
			DNS_TYPE_A,<br />
			DNS_QUERY_NO_HOSTS_FILE,<br />
			NULL,<br />
			&pDnsRecords,<br />
			NULL);<br />


The code above, works great.
B-U-T, I practically, I do not want to use the full name of the host, which is:
"subdomain1.SubDomain.MainDomain.com"
Only it's name "subdomain1".

Now, when I perform the operation: "ping subdomain1", "ping" does resolve the correct IP without the full name, that means it is possible for sure.

What I want to know, is that if I get from the user the hostname:
"subdomain1"
how can I find out that it's full name is:
"subdomain1.SubDomain.MainDomain.com"

to use in the DnsQuery() that is written above?


Thanks again!
QuestionDynamic CMenu Pin
h@$@n6-Nov-08 0:20
h@$@n6-Nov-08 0:20 
AnswerRe: Dynamic CMenu Pin
Iain Clarke, Warrior Programmer6-Nov-08 0:37
Iain Clarke, Warrior Programmer6-Nov-08 0:37 
QuestionSaving Toolbar buttons List in Dynamic Array Pin
h@$@n5-Nov-08 23:20
h@$@n5-Nov-08 23:20 
AnswerRe: Saving Toolbar buttons List in Dynamic Array Pin
KarstenK5-Nov-08 23:54
mveKarstenK5-Nov-08 23:54 
QuestionCRichEditCtrl and text colors Pin
prithaa5-Nov-08 22:53
prithaa5-Nov-08 22:53 
AnswerRe: CRichEditCtrl and text colors Pin
Dhiraj kumar Saini5-Nov-08 23:02
Dhiraj kumar Saini5-Nov-08 23:02 
GeneralRe: CRichEditCtrl and text colors Pin
prithaa5-Nov-08 23:21
prithaa5-Nov-08 23:21 
AnswerRe: CRichEditCtrl and text colors Pin
Iain Clarke, Warrior Programmer6-Nov-08 1:00
Iain Clarke, Warrior Programmer6-Nov-08 1:00 
QuestionDialog Box Problem Pin
Dhiraj kumar Saini5-Nov-08 22:11
Dhiraj kumar Saini5-Nov-08 22:11 
QuestionADVAPI32.dll Pin
izyani5-Nov-08 21:51
izyani5-Nov-08 21:51 
AnswerRe: ADVAPI32.dll Pin
Saurabh.Garg5-Nov-08 22:55
Saurabh.Garg5-Nov-08 22:55 
GeneralRe: ADVAPI32.dll Pin
izyani6-Nov-08 14:36
izyani6-Nov-08 14:36 
Questionencrypted formate Pin
cpvc++5-Nov-08 20:51
cpvc++5-Nov-08 20:51 
AnswerRe: encrypted formate Pin
sashoalm5-Nov-08 21:22
sashoalm5-Nov-08 21:22 
JokeRe: encrypted formate Pin
CPallini5-Nov-08 22:12
mveCPallini5-Nov-08 22:12 
QuestionHide and show Dialog Application Pin
MsmVc5-Nov-08 19:52
MsmVc5-Nov-08 19:52 
AnswerRe: Hide and show Dialog Application Pin
sashoalm5-Nov-08 21:48
sashoalm5-Nov-08 21:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.