Archive for the ‘Windows Mobile’ Category

WMReboot 1.0

Thursday, November 22nd, 2007

WMReboot 0.2 seemed to take too long to load for what it’s function was. I figured if someone needs to reboot their device they want to do it quickly. For that reason I rewrote WMReboot as a Visual C# console application to greatly decrease the load time. It would problably run faster if I used C++ but I’m more comfortable in the managed code arena so we’ll take things one step at a time :-) Read more here.

WMStopWatch 0.6

Thursday, November 22nd, 2007

Quick release of WMStopWatch to fix the issues caused in the 0.5 release. Read more here.

WMStopWatch 0.5

Thursday, November 22nd, 2007

I’ve released a new version of WMStopWatch that adds a countdown mode. The countdown mode allows you to set a time and optionally a wav file. When the timer reaches the countdown time the default system beep or the configured wav file is played. Read more here.

Process Manager 0.1

Saturday, September 8th, 2007

ProcessManager is a simple task manager for Windows Mobile devices. I wrote it to test my CC.System.Diagnostics class library. Download the application here.

CC.System.Diagnostics 0.1

Saturday, September 8th, 2007

I needed a way to find a process by it’s name on my Motorola Q so I modified some example code provided by Microsoft and wrote this simple class library. You can read more about the details here.

WMStopWatch 0.4

Thursday, September 6th, 2007

I wasn’t happy that versions 0.3 and below only supported a resolution of ~1 second so I have released an updated version that supports millisecond resolution (more if I wanted and your device supports it). Also added options to control the background and foreground colors and tried to fix an issue on Pocket PCs where “closing” the application minimized it (waiting on feedback, don’t have a Pocket PC to test on). Read more here.

Moto Q Flashlight 0.1

Wednesday, August 29th, 2007

Moto Q Flashlight allows the user to control the state of the camera flash. It has three modes of operation: Normal, Strobe, and Morse Code. The application consists of a Win32 DLL written in Visual C++ that exposes the native API to control the camera flash and a GUI written in Visual C#. Click here for more info.

Controlling the camera flash on the Moto Q (and other Windows Mobile devices?)

Tuesday, August 28th, 2007

There is an application out there for the Moto Q that allows you to enable / disable the camera flash and use it like a flashlight. I think it’s a great idea and could be a very useful application. Being cheap and a programmer I set out to code my own solution rather than fork over the $4.95 or make a keygen (seriously, why wrap the flash control functions in a C++ DLL but expose your key verification function in an unobfuscated IL binary ;). Ok you caught me I wrote a keygen and then moved on heh )

Thanks to the awesome support team at MOTODEV for pointing me towards the DeviceIoControl API:

The camera flash light can be controlled as a COM-port using “CAM1:” as a device.

Use the CreateFile() call to get a handle the camera driver, with the filename “CAM1:”.

Then use this file handle to make a call to DeviceIoControl() using the IOCTL (see the code below) and set the ‘Value’ value with a DWORD variable. 0=flash off and any other value=flash on.

The code shown below will change the state of the flash on a Moto Q. I’ve started work on a Win32 DLL to expose the native functions to a VB.NET or C# project. I’d like to start using C# more so I’ll probably write a frontend to control the flash.

HANDLE hCam = NULL;  

CSPROPERTY_CAMERACONTROL_S InputBuffer;
CSPROPERTY_CAMERACONTROL_S OutputBuffer;
ULONG DataLength = sizeof(CSPROPERTY_CAMERACONTROL_S);
ULONG ReturnedLength; // Number of bytes returned in output buffer  

hCam = CreateFile(TEXT("CAM1:"), GENERIC_WRITE | GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);  

InputBuffer.Property.Set = PROPSETID_VIDCAP_CAMERACONTROL;
InputBuffer.Property.Id = CSPROPERTY_CAMERACONTROL_FLASH;
InputBuffer.Property.Flags = CSPROPERTY_TYPE_SET;
InputBuffer.Flags = CSPROPERTY_CAMERACONTROL_FLAGS_MANUAL;
InputBuffer.Value = 1;  //1==flash on, 0==flash off  

if (!DeviceIoControl(hCam, IOCTL_CS_PROPERTY, &InputBuffer, DataLength, &OutputBuffer, DataLength, &ReturnedLength, NULL))
{
    DWORD errCode = GetLastError();
}

WMReboot 0.2

Friday, August 24th, 2007

WMReboot is a simple Visual Basic .NET 2.0 application to reboot your Windows Mobile 5 device. The application calls SetCleanRebootFlag and KernelIoControl API from coredll.dll to perform the reboot operation. All testing was done on my Moto Q. Click here for more info.

WMStopWatch 0.3

Thursday, August 23rd, 2007

Just a quick update to release the CAB installer for WMStopWatch. I’ll go back and build a CAB for Moto Q Tweaker as well. Find the release here.