Posts tagged ‘windows mobile’

isEnetOnline: a tool to detect ethernet connect on Windows Mobile

isEnetOnline

During some testing of the event notifcation interface on a PocketPC device, I found that some essential events are declared but will never be fired. Two of these unsupported events are: NOTIFICATIONEVENTNETCONNECT and NOTIFICATIONEVENTNETDISCONNECT. So I started a small eVC4 workspace for ITC Pocket PC with Windows Mobile 2003 with one simple test application to play with the mibInterface.dwOperStatus. Then I got an app, that will start another process (given by the command line). This tool is now called iRunOnNet.exe and will launch an exe (ie call “iRunOnNet.exe \windows\calc.exe” to have the caculator come up on ethernet connect), if an ethernet connection (the ITC device designed for has a dock ethernet connector) comes up. You can stop the hidden tool by launching it again with the argument -stop.

As a second goal, I would like to get a simple DLL that will export the status of an ethernet connection. Additionally I made a tool (isOnlineDLLtest.exe) that is used to test the functionallity of the DLL. The DLL only exports one function fnIsEnetOnline(). This will give a 0, if ethernet is offline and 1, if ethernet is online. A second export is the variable nIsEnetOnline which will hold the last status. The isOnlineDllTest uses the function fnIsEnetOnline() in a timer and simply shows a text with the last result of this call.

iRunOnNet is a stand-alone app and does not need isEnetOnline.dll. You can either directly use iRunOnNet to have an application launch on a ethernet network connection or you have your own apllication use isEnetOnline.dll in a timer to check for an ethernet connect. The sources for all this is attached.

Continue reading ‘isEnetOnline: a tool to detect ethernet connect on Windows Mobile’ »

iRunAtEvent

This tool will start an application given by the command line at a specified event. On every call, the tool will write a log (iRunAtEvent.log.txt) to the root dir. The arguments supported are:


  set appname eventtype   -sets the event eventtype to launch appname

  reset appname             -resets ALL events for appname

  list                      -list all known registered events and the applications to launch

Continue reading ‘iRunAtEvent’ »

Using ws.geonames.org timezone webservice without WSDL

The great site geonames.org offers some webservices. One of these is called timezone and will give you the timezone information for a given geographic Latitude and Longitude. With a GPS enabled Windows Mobile device you can so query the webservice and get timezone informations for the current location.

Unfortunately the webservice does not offer WSDL and so you have to write your own wrapper class. I wrote a small class that does the HttpWebRequest and decodes the xml reponse for easy use in your application.

Continue reading ‘Using ws.geonames.org timezone webservice without WSDL’ »

Disable SMS and other messaging on Windows Mobile

If you want to lockdown a user of a Windows Mobile device to not send/receive SMS messages or eMails, you can use a blacklist. First enable Disallow policy on the device and then list all apps you dont like the user to run.

REGEDIT4

;Enable blacklist of applications that should not run
[HKEY_LOCAL_MACHINE\Security\Policies\Shell]
"DisallowRun"=dword:1

;Add entries to blacklist of applications that should not run
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun]
"1"="tmail.exe"
"2"="sms.dll"
"3"="poutlook.exe"
;add more here as "3", "4", "5", etc.

tmail.exe, sms.dll and poutlook.exe are responsible for message handling on the device. If you disallow them, the user cannot start them anymore.