42Gears Speaks
7Aug/090

How to programmatically play Screen Tap sound on Windows Mobile?

Lots of sounds that we hear when using Windows Mobile and Windows CE devices are generated by the OS by playing wav files. They are located in \Windows folder. You can use them in your program with a call to PlaySound API.

But the sound played when screen is tapped is not a wav file. Looking through Windows CE source code, I found that during OS image building two wave files tchsoft.wav and tchloud.wav are embedded into a waveapi.dll as resources. Following is the code snippet to play the soft and loud Screen Tap sounds.

#define ID_WAVE_TCHLOUD 102
#define ID_WAVE_TCHSOFT 103

HMODULE hModule = LoadLibrary(L"waveapi.dll");
PlaySound(MAKEINTRESOURCE(ID_WAVE_TCHSOFT), hModule, SND_RESOURCE);
PlaySound(MAKEINTRESOURCE(ID_WAVE_TCHLOUD), hModule, SND_RESOURCE);
FreeLibrary(hModule);

Note: The identifier values or the logic might change in future, so be careful to test it. In any case you can look through CE source code to know the latest implementation.

I hope many people will find this useful.

Go to Home


4Aug/090

Mobilize your business with Windows Mobile

Do you have people in your company who are always on the move, to meet customers or to perform field jobs? Yes! Well...your mobile workforce needs the power of mobile computing to do the job quickly and efficiently.

Any mobile solution consists of a suitable mobile device (hardware) and a business application (Software) that runs on it. One thing which impacts both these components is the operating system installed on the device. Your company might choose to develop the business critical application for a particular OS but you need to make sure that same OS is available on variety of mobile devices (preferably from different vendors). It's good to have a pool of different devices running the same OS.

Windows Mobile and its versatile cousin Windows CE are becoming platforms of choice for developing and deploying mobile business applications. Following are some of the non-technical reasons to embrace Windows Mobile in your mobility projects.

Short learning curve for End-Users
Anyone who has used desktop Windows already has a fair idea of how to use a Windows Mobile device. This gives enterprises a headstart in deploying their applications. They don't have to spend too much time and money in training their mobile workforce.

Good Developer Base
There are thousands of developers writing applications for Windows Mobile or Windows CE. Besides that there are millions of developers doing programming for desktop windows. All these developers are potential Windows Mobile developers. This is possible due to the fact that Microsoft provides a subset of Win32/.NET APIs for mobile device programming.

Windows Mobile and CE are not at stripped down versions of desktop Windows. They were carefully designed and are being upgraded according to the needs of mobile and embedded device requirements. To ease the application development, subset of desktop APIs were provided to access system information and to perform system functions. This is like two houses that from outside have similar looking doors and windows but have completely different interiors.

Strong Integration with desktop Windows
Your Line of Business (LOB) application will mostly not work independently. After data collection and basic processing on the device, it is transferred to server for backend processing. Windows Mobile integrates well with other desktop servers like Microsoft SQL server, Exchange Server etc.

Besides these non-technical reasons, there are many technical ones which make Windows Mobile a better choice for businesses. That's a good topic for a future post.

Go to Home