SMS messaging objects

SMSSession object interface

Nonvisual user objects in PocketBuilder provide support for sending Short Message Service (SMS) messages from applications that you deploy to devices that use the SMS messaging protocol. This includes the "Phone Editions" of Pocket PC devices, as well as all Smartphone platforms. SMS involves the combination of text-based e-mail (although other types of data can be sent) and a paging mechanism.

The SMSSession object provides the interface for a PocketBuilder application and the SMS messaging system on a Pocket PC or Smartphone device. It also provides access to the SMSAddress, SMSMessage, and SMSProtocol objects.

Receiving SMS messages

You can also receive SMS messages in PocketBuilder applications running on Windows Mobile 2003 platforms. PocketBuilder provides a shim DLL, PKSMS25.DLL, that contains a COM object that hooks into the SMS processor. The DLL should be copied to the \Windows directory of a Pocket PC device or the \Storage\Windows directory of a Smartphone device. You must register the DLL with the operating system, then perform a soft reset on the device.

You can deploy the DLL along with registry settings in the CAB file you create for a customer application. The DLL is not part of the standard CAB file that you generate from the PocketBuilder Project painter. You can use the Enhanced CAB Generation tool to add the PKSMS25.DLL file to the CAB file, or you can add it manually.

Registering the shim DLL

To register the DLL, you can use the Enhanced CAB Generation tool (see “Support for SMS receiving in generated CAB files”) or either of the following approaches:

In order to receive SMS messages in an application, you must set the second argument in the Open call for the SMSSession object to 2 or 3.

NoteUnregistering a DLL You can unregister the DLL by calling DLLUnregisterServer from your application. You must perform a soft reset after you unregister a DLL.

Support for SMS receiving in generated CAB files

The Other Options tab page in the Enhanced CAB Generation tool has check boxes that let you include the following in a CAB file that you deploy to a device:

You access the Enhanced CAB Generation tool on the Tool tab of the New dialog box.

For more information

Properties and functions of the SMSSession, SMSAddress, SMSMessage, and SMSProtocol objects are described in the PowerScript Reference and in the online Help.