The three applications of network application

Source: Internet
Author: User

First, to determine whether you have been linked to the Internet

Read the local IP address using the Netmasters powersock control, if the "0.0.0.0" description is not connected.

Example:

void __fastcall TForm1::Button1Click(TObject *Sender)
{
if (Powersock1->LocalIP == "0.0.0.0")
ShowMessage("not connected");
else
ShowMessage(Powersock1->LocalIP);

Second, the issue of dialing

1, dial-up

You need to use the following telephony API.

function function

Lineinitializeex () Initialization of TAPI

Lineopen () get an available phone line handle (handle)

Linemakecall () Start dialing

To complete sending data outside of TAPI

Linedrop (),

Linedeallocatecall (),

Lineclose ().

Lineshutdown () End dialing

Third, call the browser

1.头文件:#include <shellapi.h>
2.void __fastcall TForm1::Button1Click(TObject *Sender)
{
ShellExecute(Application->Handle,"open",
"http://www.inprise.com",NULL,NULL,SW_SHOW);
}

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.