Connmgrmapurl function of GPRS

Source: Internet
Author: User

Recently, I am working on GPRS. I am not very clear about some of the functions. I will record them one by one ....

 

Online materials:

Connmgrmapurl () allows the system to select the most suitable network connection to access the URL through the pwszurl address you have given, if your mobile phone can access a network resource in multiple ways, such as GPRS, ActiveSync, WiFi, and 3G, you don't have to worry about how to connect to the Internet with this API, the system will select the most suitable network connection for you. The second parameter guid * pguid is based on your first parameter pwszurl, that is, whether the URL you access is HTTP or WAP, each with a globally unique identifier. It seems that only the following four types are supported:

// {436ef144-b4fb-4863-a041-8f905a62c572}
Define_guid (iid_destnetinternet, 0x436ef144, 0xb4fb, 0x4863, 0xa0, 0x41, 0x8f, 0x90, 0x5a, 0x62, 0xc5, 0x72 );

// {A1182988-0D73-439e-87AD-2A5B369F808B}
Define_guid (iid_destnetcorp, 0xa1182988, 0x0d73, 0x439e, 0x87, 0xad, 0x2a, 0x5b, 0x36, 0x9f, 0x80, 0x8b );

// {7022e968-5a97-4051-bc1c-4408e2fba5d9}
Define_guid (iid_destnetwap, 0x7022e968, 0x5a97, 0x4051, 0xbc, 0x1c, 0xc5, 0x78, 0xe2, 0xfb, 0xa5, 0xd9 );

// {F28D1F74-72BE-4394-A4A7-4E296219390C}
Define_guid (iid_destnetsecurewap, 0xf28d1f74, 0x72be, 0x4394, 0xa4, 0xa7, 0x4e, 0x29, 0x62, 0x19, 0x39, 0x0c );

 

Guid indicates the Globally Unique Identifier corresponding to each access point, you can view connmgr In the "/program files/Windows CE tools/wce420/Pocket PC 2003/include/armv4" directory. h file, which contains the guid of each access point, for example:

Cmnet(0x436ef144, 0xb4fb, 0x4863, 0xa0, 0x41, 0x8f, 0x90, 0x5a, 0x62, 0xc5, 0x72)

 Cmwap0x7022e968, 0x5a97, 0x4051, 0xbc, 0x1c, 0xc5, 0x78, 0xe2, 0xfb, 0xa5, 0xd9

 

You don't need to remember what the value is. The system will determine the value based on the URL protocol header. You can write it like this:
Connmgr_connectioninfo CI = {0 };
DWORD dwindex = 0;
Hresult hR = connmgrmapurl (L "http://www.google.com", & (CI. guiddestnet), & dwindex );

 

 

WM has a meta-network concept. guid corresponds to a meta-network. literally, it is "metanetwork", that is, it can be understood as the smallest unit of the network unit operated by WM on the network. each metanetwork provides a type of network connection. By default, four metanetworks are used on WM, that is, Internet connection, WAP, unit, and security (forgot, if you are not sure about the name, you can configure multiple APN connections under each metachinnet. cmnet is an internt connection of APN = cmnet, while cmwap is a WAP connection of APN = cmwap. currently, the Connection Manager is designed for the target network, that is, for different meta-networks, rather than for the APN. you can also add your own custom meta-network to manage a type of APN connection types and operations you want to perform.

Therefore, the connmgrmapurl function is used to find the guid corresponding to the best meta-Network for users.
In addition, WAP-type connections need to be directly connected to the Internet through the WAP proxy. Therefore, when setting cmwap, you must specify the IP address of the proxy server to connect. in WM, proxy actually connects two different meta-network networks and tells the connection manager that the proxy can also connect to the Internet through the WAP meta-network.

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.