Posts tagged ‘ethernet’

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’ »