One Network is divided into two types. The first most common is to select the DMA unit network through ActiveSync, and then set the IP address in the NIC so that you can open the web page. This method is everywhere on the Internet, so I won't go into details,
However, if you want to Implement UDP programming, you must use the second method. For more information about the setting method, see my other blog post.
2 send SMS smssendmessage
3. Text message interception
The SDK provides a mapirule example to show how to intercept text messages. To filter spam messages or intercept messages of certain numbers, we need to insert a bar in the processmessage function. It is handled based on the sender's phone number (pspvemail-> value. lpszw) or text message content (pspvsubject-> value. lpszw. After mapirule. dll is compiled, modify the registry. (1) Add hkey_classes_root \ CLSID \ {3ab4c10e-673c-494c-98a2-cc2e91a48115 \ inprocserver32 to the Registry. The default value is mapirule. DLL, numeric type; 2) add an HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ inbox \ SVC \ SMS \ rules with the new key name {3ab4c10e-673c-494c-98a2-cc2e91a48115}. The value is 1 and DWORD. After the registry is changed, copy mapirule. DLL to the Windows directory. Restart your phone and the interception starts to take effect.
The SDK provides a mapirule example to show how to intercept text messages. To filter spam messages or intercept text messages of certain numbers, we need
Insert a bar in the processmessage function. Based on the sender's phone number (pspvemail-> value. lpszw) or text message content
(Pspvsubject-> value. lpszw. After mapirule. dll is compiled, modify the registry. In this example
Note: 1) Add an hkey_classes_root \ CLSID \ {3ab4c10e-673c-494c-98a2-to the Registry-
Cc2e91a48115 \ inprocserver32, the default value is mapirule. dll, Volume type; 2) add an item
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ inbox \ SVC \ SMS \ rules, new key name: {3ab4c10e-
673c-494c-98a2-cc2e91a48115}, value: 1, DWORD type. After the registry is changed, copy mapirule. DLL to the Windows directory. Heavy
Start the mobile phone and the interception starts to take effect.
4 phone
In addition to using linemakecall of TAPI to call the phone, there is a simple function called phonemakecall:
Phonemakecallinfo Info;
Info. cbsize = sizeof (phonemakecallinfo );
Info. dwflags = pmcf_promptbeforecalling;
Info. pszdestaddress = L "13800138000 ";
Info. pszappname = NULL;
Info. pszcalledparty = NULL;
Info. pszcomment = NULL;
Phonemakecall (& info );
TAPI also supports incoming call interception. For more information, see lineinitialize.
5. CreateProgramShortcut
The system provides two APIs to support creation shortcuts:
DWORD winapi shcreateshortcut (
Lptstr szshortcut,
Lptstr sztarget
);
DWORD winapi shcreateshortcutex (
Lptstr lpszdir,
Lptstr lpsztarget,
Lptstr szshortcut,
Lpdword maid cut
);
6 programs self-starting
1) Place the executable program file or shortcut file to the \ windows \ Startup directory;
2. Create a service.dlland add it to services.exe.
7 shutdown and restart
Exitdomainwex (ewx_poweroff, 0); // Shutdown (Pocket PC is not supported and implemented by each vendor)
Exitwindowex (ewx_reboot, 0); // restart
8. Use the mouse and keyboard hook
The Windows system obviously does not support Hook Technology. Some technical documents simply say that wince does not support hooks. Actually, not all. We can still
In coredll. dll, some useful interfaces are obtained to intercept some simple keyboard or mouse actions. If a hook has been started in a program, other programs cannot use the hook.
We recommend that you use this function with caution because it is not publicly available by Microsoft and may cause potential problems. Microsoft may not support hooks in future versions.
9 poom operations
Poom is a set of COM interface libraries based on Microsoft COM technology for personal information management on mobile phones (PIM. Poom not only includes operations on the contact (icontact), but also
Includes personal information management, such as task (itask) and appointment reminder (iappointment. BelowCodeDemonstrate how to get a contact name:
Hresult hr;
Ipoutlookapp * polapp = NULL;
Ifolder * pfolder = NULL;
Ipoutlookitemcollection * pitemcol = NULL;
Int nitems;
Coinitializeex (null, 0 );
HR = cocreateinstance (_ uuidof (application), null, clsctx_inproc_server, _ uuidof (ipoutlookapp), (lpvoid *) & polapp );
Polapp-> Logon (null );
Polapp-> getdefaultfolder (olfoldercontacts, & pfolder );
Pfolder-> get_items (& pitemcol );
Pitemcol-> get_count (& nitems );
BSTR bstrfirstname;
BSTR bstrlastname;
Icontact * pcontact;
For (INT I = 1; I <= nitems; I ++)
{
HR = pitemcol-> item (I, reinterpret_cast <idispatch **> (& pcontact ));
If (succeeded (HR ))
{
Pcontact-> get_firstname (& bstrfirstname); // surname
Pcontact-> get_lastname (& bstrlastname); // name
Sysfreestring (bstrlastname );
Sysfreestring (bstrfirstname );
}
}
Polapp-> logoff ();
Polapp-> release ();
Couninitialize ();
10 mapi is a com-based library that provides a programming method for client applications to operate "messages" (information), including text messages and emails.
11 mobile phone shake
You can use the vibrate function to shake your phone:
Int caps =-1;
Caps = vibrategetdevicecaps (vdc_amplaps );
If (CAPS <= 0)
{
Return;
}
Hresult hR = vibrate (0, null, true, infinite );
Sleep (150 );
You can also use the nledsetdevice function:
Nled_count_info NCI;
Int nindex = 1;
If (nledgetdeviceinfo (nled_count_info_id, (pvoid) & NCI ))
{
Nindex = (INT) NCI. cleds-1;
}
Nled_settings_info settings;
Settings. lednum = nindex;
Settings. offonblink = 1;
Nledsetdevice (nled_settings_info_id, & settings );
Sleep (150 );
Settings. lednum = nindex;
Settings. offonblink = 0;
Nledsetdevice (nled_settings_info_id, & settings );
12 IMEI, imsi, mobile phone number, and mobile phone model
IMEI: International Mobile Equipment Identity
Number), composed of 15 digits, used to identify each independent mobile phone in the mobile phone network. It is equivalent to a mobile phone ID card. Each group of International Mobile Communication identifiers has 15 Arabic numerals and
The first 6 codes are the codes of the original manufacturer, the 8 codes in the middle are the "Serial Number", and the last 1 code is the standby code. The number of each code of the International Mobile Communication identification code is used to identify the mobile phone, and it is an international public
Shared digital principles.
Imsi: International Mobile Subscriber Identity. In the GSM system, each mobile user is assigned a unique international user identification code (imsi, this code is valid in all locations in the network, including the roaming area.
Mobile phone numbers are generally not stored in SIM cards, but in the carrier's database. Some Mobile Platforms provide interfaces for obtaining mobile phone numbers. However, most carriers have blocked these interfaces for privacy and security considerations.
The code is omitted and can be found online.
Generally, the name field in the Registry key HKEY_LOCAL_MACHINE \ ident is the mobile phone model. The mobile phone model may also be included in the UA string. Use the following function to obtain the UA string:
Hresult obtainuseragentstring (
DWORD dwoption,
Lpcstr pcszuaout,
DWORD * cbsize
);
The read value of this function is stored in the custombase item in the Registry HKEY_LOCAL_MACHINE \ SECURITY \ Internet Explorer \ User Agent.
13 getsystemtime is the Greenwich Mean Time, while getlocaltime is the current time zone.
14 window adaptive input method
In PPC, when the input method is displayed, the interface space for user operations becomes smaller. How can I make the interface adaptive input method status?
Sipinfo Si = {0 };
Si. cbsize = sizeof (SI );
Shsipinfo (spi_getsipinfo, 0, & Si, 0 );
Bool bshow = Si. fdwflags & sipf_on;
If bshow is true, the input method is displayed. Otherwise, it is hidden.
Sipinfo is defined as follows:
Typedef struct tagsipinfo
{
DWORD cbsize;
DWORD fdwflags;
Rect rcvisibledesktop;
Rect rcsiprect;
DWORD dwimdatasize;
Void * pvimdata;
} Sipinfo;
The interface size required by rcvisibledesktop and rcsiprect can be calculated.
in response to the wm_settingchange message, use the shsipinfo function to obtain the input method panel parameters and desktop visible region parameters, and then configure the window.