Windows core programming code analysis based on Visual C ++ (51) Remote Control Based on anonymous Pipelines

Source: Internet
Author: User

 

 

 

 

We know that the domain name is a dedicated address translation system for convenience of memory. to access a server on the internet, it must be implemented through IP addresses, domain name resolution is the process of re-converting a domain name to an IP address. A domain name corresponds to an IP address, and an IP address can correspond to multiple domain names. Therefore, multiple domain names can be resolved to one IP address at the same time. Domain name resolution needs to be completed by a dedicated domain name resolution server (DNS. For example, a domain name is www. staspcom wants to see the current HTTP service. If you want to access the website, you need to resolve it. First, resolve the domain name registrar to a fixed IP address of a web server through a dedicated DNS Server: 211.214.1. *** then, the web server receives the domain name and. the staspcom domain name is mapped to this server. Enter www. the staspcom domain name can access the website content. that is, the whole process of domain name resolution is realized. People are used to memorizing domain names, but machines only recognize IP addresses. domain names and IP addresses correspond to each other. The conversion between them is called domain name resolution, domain name resolution must be completed by a dedicated domain name resolution server. The entire process is automated. The domain name resolution protocol (DNS) is used to map host domain names and email addresses that are easy to recognize by computers. DNS is a C/S structure. The client is used by the user to find the address corresponding to a name, while the server is usually used to provide query services for others.

Next we program domain name resolution,

 

# Include "stdafx. H "# include" test3.h "# include" test3dlg. H "# include" windns. H "# include" winsock2.h "# include" winerror. H "# ifdef _ debug # define new debug_new # endif // ctest3dlg dialog box ctest3dlg: ctest3dlg (cwnd * pparent/* = NULL */): cdialog (ctest3dlg: IDD, pparent) {m_hicon = afxgetapp ()> loadicon (idr_mainframe);} void ctest3dlg: dodataexchange (cdataexchange * PDX) {cdialog: dodataexchange (PDX); ddx_control (PDX, I Values, m_addrctrl1); ddx_control (PDX, percentages, percentages); ddx_control (PDX, idc_list1, m_listbox);} values (ctest3dlg, cdialog) on_wm_syscommand () on_wm_paint () values () //} else (idc_button1, & ctest3dlg: Taobao) on_notify (ipn_fieldchanged, idc_ipaddress1, & ctest3dlg: Taobao) end_message_map () // ctest3dlg message handler Bo Ol ctest3dlg: oninitdialog () {cdialog: oninitdialog (); cmenu * psysmenu = getsystemmenu (false); // set the icon of this dialog box. When the main window of the application is not a dialog box, the framework will automatically // execute this operation seticon (m_hicon, true); // set the big icon seticon (m_hicon, false ); // set the small icon setdlgitemtext (idc_e_name, "www.baidu.com"); Return true; // return true} void ctest3dlg: onsyscommand (uint NID, lparam) {cdialog: onsyscommand (NID, lparam);} void ctest3dlg: onpaint () {If (isiconic () {cpaintdc (this); sendmessage (response, reinterpret_cast <wparam> (DC. getsafehdc (), 0 );// Center the icon in the work rectangle int cxicon = getsystemmetrics (sm_cxicon); int cyicon = getsystemmetrics (sm_cyicon); crect rect; getclientrect (& rect); int x = (rect. width ()-cxicon + 1)/2; int y = (rect. height ()-cyicon + 1)/2; // draw the icon DC. drawicon (X, Y, m_hicon);} else {cdialog: onpaint () ;}// hcursor ctest3dlg: onquerydragicon () {return static_cast 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.