|
Hey everybody.
I'm having troubles in resolving (using DNSQuery()) a hostname in a subdomain.
I'll explain.
Lets assume MainDomain and SubDomain.
Now, SubDomain is a subdomain to MainDomain (kinda obvious ).
Well... I'm on a host called "maindomain1" and there is a host called "subdomain1".
When I am using DNSQuery() from "maindomain1" to "subdomain1" I get that "subdomain1" does not exist.
What I actually need to do is to place subdomain1's full name:
"subdomain1.SubDomain.MainDomain.com" and it will work.
BUT, I don't want to place the full name!
"Ping" for instance can resolve only by getting "subdomain1", while nslookup can't...
I want to know how "Ping" know how to resolve that subdomain1 name,
Or in other words, is there a C++ function that receives "subdomain1" and returns "subdomain1.SubDomain.MainDomain.com" ???
Thanks a lot!!!
|
|
|
|
|
Green Fuze wrote: using DNSQuery()
How are you using it? There are several parameters with many options. You did not post your code so we don't know what you are doing. Also what domain are you trying testing with?
led mike
|
|
|
|
|
Right
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!
|
|
|
|
|
Can we show/hide MenuItems at runtime.
Is there any example.
Thanks
destined to win
|
|
|
|
|
To disable them is dead easy with MFC. You just provide an ON_UPDATE_COMMAND handler for a command, and away you go.
For 99% of my menus, I prefer to go this way. Then a user can say "ah, here the option is, I just can't use it right now for some reason".
The option is the one MFC uses by default - switch the menu set completely. It has one for "no view", and each view has an associated menu it puts in place. No point in having much more than open, close and help for an MDI app with no documents... I just use one global menu, but their approach is a perfectly good one.
The last thing I do is to have a setup submenu on my Tools menu. The first menu option on that submenu has an ID of IDM_CONTROL_EDITBUSFILE. If the user has not put a specific flag on the command line, I remove the submenu completely. This saves them accidentally doing something that only knowledgable people (ie me and my colleagues) can do.
Iain.
...
ON_UPDATE_COMMAND_UI(IDM_CONTROL_EDITBUSFILE, OnUpdateControls)
...
void CIOBus::OnUpdateControls (CCmdUI* pCmdUI)
{
if (pCmdUI->m_pSubMenu)
{
if ( (pCmdUI->m_nID == IDM_CONTROL_EDITBUSFILE) && !CGlobals::IsSettingUp () )
pCmdUI->m_pMenu->DeleteMenu (pCmdUI->m_nIndex, MF_BYPOSITION);
return;
}
...
|
|
|
|
|
hi
How i can save CToolbar buttons in a dynamic information with enable or disable bit information.
Thanks
|
|
|
|
|
|
Hello,
If I have a CRichEditCtrl object then can this object contain a string (sentecnce)with different text colours and sizes for each word.
Pritha
|
|
|
|
|
|
|
|
I am working on an mfc application. In my application I have a dialog box which is having a IDC_EXPLORER1 ActiveX control for showing web pages.
The dialog box opens when i click a button.
What i want is that i want the dialog box such that it cannot be moved nor resized. also i want to change the size and position of dialog box during button click.
Kindly help me.
Thanks.
Dhiraj
|
|
|
|
|
Hi all,
I just want to ask. Is anybody has the advapi32.dll for Windows Vista SP1-32 bit.
Thanks,
|
|
|
|
|
|
can i have the copy?
my email: izyani@yahoo.com
|
|
|
|
|
Hi All
How can i write data in encrypted formate in file?Plz elp me
|
|
|
|
|
look at this[^]
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
thswy.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi All
How can hide and show dailog Application?I have a button Hide and i am useing code for hide is ShowWindow( SW_HIDE );
Now i want to open this application again then new application is open and i want to open hide application.Or i want to show hide application. Plz elp me![Rose | [Rose]](https://www.codeproject.com/script/Forums/Images/rose.gif)
|
|
|
|
|
|
Thanks for reply But i don't want to show in system tray.My application is run in hidden mode and exe is showing on desktop.when user click on that exe then that hidden application will be show.Plz help me
|
|
|
|
|
The article contains exactly that info too, in addition to the system tray stuff. Skip the parts about the system tray and read how to make a single instance program.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
|
When you run an instance of your exe, first you can check if another instance is running. If it is then make old instance visible and exit from the new instance.
Saurabh
|
|
|
|
|
Are you looking for something like this?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|