Provoking Post

For any mobile operating system that you can name you can find some one that will point out what they feel to be a flaw in the operating System.  Mike  Calligaro of the Windows Embedded team knows this all to well.  If you read through the reader responses to many of his post you’ll find a plethora of emotionally charged responses  For some of the responses I get the feeling the reader didn’t actually read the entire post.  For others some readers make pretty good arguments. In either case I decided to collect what I thought to be the most interesting post addressing features of Windows Mobile that many have questioned.

Interesting Post

Quotes from Mike:

In response to “why can’t you fix the damn bugs

As much as I love the job, there are certainly frustrations as well. One of them is that more than half of the code on one of our phones is written by other people (OEMs, ISVs contracted by OEMs, ISVs contracted by Mobile Operators, etc) and any failing in any of that code is usually blamed on us.


From the BlogEngine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

Why Can’t I Create a Smart Device Project?

So you’ve installed Visual Studio and you are ready to create a Smart Device project for your Windows Mobile device.  But when you go to create a new project the Smart Device templates are no where to be found.  Why is that?  Let’s look at the possible causes for this problem. 

Is your Visual Studio Version an Express Edition?

Presently Microsoft doesn’t have a version of Visual Studio Express that can be used to create smart device projects. If you are running an Express Edition of Visual Studio you will need to replace it with a professional version to develop for Windows Mobile. 


From the BlogEngine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

24 Hours of Windows Mobile : two thirds complete

As of today the “24 Hours of Windows Mobile” presentations are 2/3 complete.  I’ve been keeping track of the presentations.  If you would like to see any of them the links are below. 

TitleLevelDescription
Introduction to Windows Mobile Development200High level introduction to developing managed applications for mobile devices
Interoperability Between Native and Managed Code300Basic’s of P/Invoke and using COM objects
Creating Adaptive Applications300Creating applications that work with a wide variety of formfactors
Using Pocket Outlook Data within a Managed Application300Retrieving and manipulating data stored within Pocket Outlook
Live Update from PDC300Sharing news announced at PDC time and other demonstrations
Developing Battery Friendly Applications for Windows Mobile300Demonstration of the State and Notifications broker and other features of Windows Mobile that can assist in developing applications that consume less power
Unit Testing for Mobile Devices300Explore using the unit testing functionality of Windows Mobile for devices
Testing Your Mobile Applications300Strategies for testing your Mobile Application
IPC and True Push300Asynchronous programming techniques inside your managed application
Windows Mobile Networking300Negotiating and establishing a network connection
Location Awareness300Location services available for Windows Mobile
Windows Mobile Power Toys200Tools to assist you in diagnosing information about your running applications.
App Dev with VS 2008 and SDK tools300what is new in the Microsoft .NET Compact Framework 3.5 and how to develop Windows Mobile client applications effectively.
Device Security300Explains how the Windows Mobile Security model works, and they show you how you can mimic device security using the emulator.
Tips for App Devs300Tips to improve your productivity in developing for Windows Mobile in Visual Studio.
Asynchronous Development Techniques300Learn how to properly start and terminate threads, update user interface controls inside multiple threads, and call Web services asynchronously.

From the BlogEngine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

Sneak Peak of Windows Mobile 6.5

Michael Herald of Mobility Today has posted a video of Windows Mobile 6.5 with IE6 running on his HTC Diamond.  It runs incredibly well.  See the Mobility Today site for more details.


From the Blog Engine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

Custom Actions in a Cab Installation

Creating a cab installer for a Windows Mobile program is easy.  After making a cab project you add your files and Visual Studio does everything else for you.  But when you uninstall your application what happens to all of the registry entries and data files that your application has made?  They get left behind unless you erase them yourself. Chances are your program won’t ever receive any notification that it is about to be uninstalled, so your program won’t be able to cleanup after itself.  Instead you will need to create a DLL that contains custom actions.   The installer build into the Windows Mobile device will call your DLL once before installation, once after installation, once before deinstallation, and right after deinstallation.  So how to you make this custom DLL?

The custom DLL will be a Win32 DLL smart device project. The DLL must define four functions, Install_InitInstall_ExitUninstall_Init, and Uninstall_Exit. To cleanup after your program has been uninstalled you will place cleanup code in Uninstall_Exit Here is the code for the custom actions DLL that I wrote. I’ve added code to clean up the registry.  If there are other programs that I’ve written still on the device they will be using the same registry hive to store their keys.  If other programs are found the program will leave behing the \HKCU\Software\J2i.Net key as not to accidentally erase the keys that my other programs use.  If there are no other programs found then J2i.Net will be removed.

BOOL APIENTRY DllMain(HANDLE hModule,
	DWORD ul_reason_for_call,
	LPVOID lpReserved
	)
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		break;
	}
	return TRUE;
}

void RemoveRegistryKeys();
///////////////////////////////////////////////////////////////
codeINSTALL_INIT Install_Init
(
	HWND hWndParent,
	BOOL fFirstCall,
	BOOL fPreviouslyInstalled,
	LPCSTR pszInstallDir
)
{
	MessageBeep(0);
	return codeINSTALL_INIT_CONTINUE;
}

///////////////////////////////////////////////////////////////
codeINSTALL_EXIT Install_Exit
(
	HWND hWndParent,
	LPCSTR pszInstallDir,
	WORD cFailedDirs,
	WORD cFailedRegKeys,
	WORD cFailedRegVals,
	WORD cFailedShortcuts
)
{
	MessageBeep(0);
	return codeINSTALL_EXIT_DONE;
}

///////////////////////////////////////////////////////////////
codeUNINSTALL_INIT Uninstall_Init
(
	HWND hwndParent,
	LPCSTR pszInstallDir
)
{
	MessageBeep(0);
	return codeUNINSTALL_INIT_CONTINUE;
}

///////////////////////////////////////////////////////////////
codeUNINSTALL_EXIT Uninstall_Exit
(
HWND hwndParent
)
{
RemoveRegistryKeys();
MessageBeep(0);
return codeUNINSTALL_EXIT_DONE;
}
void RemoveRegistryKeys()
{
	HKEY hCompanyKey = NULL;
	HKEY hSoftwareKey = NULL;
	TCHAR buffer[MAX_PATH];
	DWORD bufferSize = MAX_PATH;
	bool canEraseCompanyKey = false;
	//Delete the application key
	RegOpenKeyEx(HKEY_CURRENT_USER, L"Software", 0, 0, &hSoftwareKey);
	if (hSoftwareKey)
	{
		RegOpenKeyEx(hSoftwareKey, L"J2i.Net", 0, 0, &hCompanyKey);
		if (hCompanyKey)
		{
			RegDeleteKey(hCompanyKey, L"MyColourPreferences");
			canEraseCompanyKey = (ERROR_SUCCESS != RegEnumKeyEx(hCompanyKey, 0, buffer, &bufferSize, 0, 0, 0, 0));
			RegCloseKey(hCompanyKey);
			RegCloseKey(hCompanyKey);
			if (canEraseCompanyKey)
				RegDeleteKey(hSoftwareKey, L"J2i.Net");
		}
		if (hSoftwareKey)
			RegCloseKey(hSoftwareKey);
	}
}

To export the four functions the DLL will also need to contain a Module Definition file that exports the four functions. The contents of that file must look like the following.

EXPORTS
Install_Init
Install_Exit
Uninstall_Init
Uninstall_Exit

That’s all that needs to be in the DLL. When you create your installer you will need to add both the primary output of your program and this DLL to the project. The last thing that you need to do is change the CE Setup DLL setting on the CAB project. Select the CAB project from the Solutions Explorer and you will see the CE Setup DLL setting in the property editor. Click on the dropdown to the right of the setting and select Browse. Navigate to the native DLL that you created and your done. All you need to do is compile and build the CAB.

As an example there is a Visual Studio project attached to this entry.  The project contains a program of trivial simplicity.  All that you need to know about that program is that it will save the information you enter to the registry.  Without the custom action when you uninstall this program that information would be left in the registry.   But thanks to the custom action it will be removed.

Apple Patenting Ambient Noise Volume Adjustment, Also Available on Windows Mobile

This isn’t the first observation of this type that I’ve seen, but Apple has filed for a patent for adjusting phone volume based on ambient noise.  As the noise in the environment goes up so will the phones volume.  Oddly enough I’ve seen a similar system published in an MSDN magazine for Windows Mobile phones.


From the Blog Engine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai


Instagram: @j2inet

Facebook: @j2inet

YouTube: @j2inet

Telegram: j2inet

Twitter: @j2inet

The Global Economy and the Terminal Redux

Earlier today Microsoft announced its plans for adjusting to the world economy. The news story I read stated that mid-PC sales were down while server software was up.  I can’t help but associate that with what a Sony exec called “A race to the bottom” in which consumer and OEMs begin to target building the cheaper computer instead of the higher performing computer.   With the increasing emphasis being placed on Cloud Computing and Web Services and it all supports a prediction that software was going to move from the individual PCs back to the servers.  We can find evidence of this now.  Previously if you wanted to work on a word document you needed a computer with sufficient space and a reasonably powered processor.  You would then need to purchase and install Microsoft Word and you could edit documents from your siloed computer.  While you can still do this today you also have the option of using an online service to essentially do the same thing.  You can use a low powered computer with any of a variety of operating systems as long as that computer has a supported browser.   The power of the individual computer matters a little less and connectivity matters a whole lot more. as applications begin to target modern terminals. 

It’s possibly that my view of the future is slightly exaggerated but I doubt it is completely wrong.  That being said my plans for adjusting to what I think to be the needs of the future are to accelerate my learning path for Microsoft Azure Services Platoform and Live Services. I’ve been experimenting with Live Services for some time now and have found them to be useful in quickly putting together useful applications.  An Azure application runs across several 64-bit Windows 2008 servers.  Installation of patches is handled for you, failover is taken care of, and so are several other maintenance tasks allowing development of highly available, secure, and redundant applications with more ease.   Effective use of the platform is going to require a different way of thinking than developing the traditional application so I plan to get started tonight with the intent of having information to teach and share within the next week.


From the BlogEngine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

Free Visual Studio 2008 eBooks

I was reading through Mike Francis’s blog and saw a rather useful offer from Microsoft for free eBooks on LINQ, ASP.NET Ajax, and Silverlight 2.0.  If you are interested all you have to do is register and you can download the eBooks.   I’ll be teaching a Silverlight class in a little over a month so I hope to review the Silverlight book fairly soon so that I can consider recommending it to the students.


From the BlogEngine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

The Yellow Book for Students of C#

I’m glad Mike Hall posted on this.  There is a free book available to those wanting to learn C#.  This is especially convinient for me because I was going to write a series of “Getting Started”  articles on Windows Mobile development and I really see the task of learning the C# (or vb.net) language as being separate from learning how to target Windows Mobile devices.  I’ll be referencing this book in one of my next articles.


From the BlogEngine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

Innovate on Windows Mobile Code Signing Offer

If you’ve developed a Windows Mobile application and would like to see it listed on the Windows Mobile Application Catalog then it will need to be tested for certification requirements and code signed.  This normally cost up to $800.  But Microsoft is offering a program whereby you can have these services performed for free.  Just visit the Innovation Site  and register.  Remember, make sure that your application adhere’s to certification guidelines before submitting the application. Otherwise you could consume part if the $800 woth of service unnecessarily.


From the BlogEngine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

Skyhook Wireless 3.0 SDK and Managed Code

As promised I uploaded the wrapper for the Skyhook Wireless SDK for Windows Mobile to the Skyhook Wireless discussion group.   I tried the wrapper out with the 3.0 SDK and it works fine.  It exposes all the SDK functionality with the exception of the WPS_tune_location function (I have no idea what that function does).  So I am done with my interaction with the Skyhook Wireless SDK for now.

If you program in C# or VB.Net and want to use the SDK then you can get the code from the files area of the Skyhook Wireless discussion group.


From the Blog Engine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

Augmented Reality on Windows Mobile

I was reading through WMPowerUser yesterday and happened upon an article on Augment Reality on Windows Mobile.  The article shows some videos from the Christian Dopler Laboratory  in which a mobile device is being used to track photographs and business cards and project 3D elements on them.  Very cool! Best of all there is code available for the computer vision library that they used.  Follow the link for the code and videos. 


From the BlogEngine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

Top 5 Searches

In reading through my Google Analytics report I see that there are a few searches that are always at the top of the list. 

Beyond having mentioned the Windows Mobile Power Toys once in refering to the “24 Hours of Windows Mobile” webcast I’ve not actually spoken about it.  But given the level of popularity I’ve decided to write an article covering it along with the EQATEC Profiler and the EQATEC Tracer.  All of these are free tools.  I wrote my outline for the article last night and am now working on the example code.  This will be something usable by both those that use Visual Studio and those that develop for Windows Mobile without Visual Studio. 


From the Blog Engine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

Applied Face Recognition

It’s time to roll up my sleeves to get my hands dirty with some native code.  I’ve got two ideas for applications of facial recognition, one for the desktop and the other for Windows Mobile.  I’ll need to take some time to plan these out, but these are my ideas…

Automatic Profiles

There was a time when my family members would use my computer and change my settings (Wall paper, resolution, sound scheme, and so on) and it would annoy me to no end. When Microsoft released Windows XP the problem was solved.  We had a much better implementation of user profiles that didn’t require any one to remember their user name and didn’t leave any one locked out if the previous user had forgotten to log out.  Many computers come with web cams, so why not use them to extend upon this concept.  Why cant the computer recognize who is sitting in front of it and act accordingly automatically changing profiles.

Where do I know that person from?

I encounter a lot of people that I don’t remember (I have a bad memory for faces).  Wouldn’t it be nice if I could point my camera phone at them and instantly get a reference to their name and face book profile?  All the technology and processing needed to do this exists today. Some one just needs to pull it all together.


Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet

User Interface Metrics and Evil User Interfaces

I am finally no longer on a project that I really disliked.  I had been on the project for 5 months with my role being to configure the software to meet the user’s needs.  A huge task in this seemingly simple task was a lot of data entry; that could be entry of a user’s account information or population of a mirid of other tables and values requireed by the application.  The main problem was not so much in the volume of data that the system required but in the manner in which the system was designed to take the data. The system had a very poor user interface.  On example of where the interface failed was in the task of creating a user account.  After entering  a user’s name and moving to the next field I was immediatly prompted to save or discard that change.  Saving the change resulted in the user editor closing and I had to reopen it, find the user I was modifying, and change the next property and answer that prompt again.   I had to be able to convey the level of inefficiency of this interface to others on my team otherwise any slowness in completing a task could be percieved as being from an inadequacy on my part. 

To state “The interface in this system is bad, I don’t like it” may not be well received.  The statement sounds subjective and can be evaluated as nothing more than some one complaining.  To sufficiently communicate the state of the interface I needed to show that it was poor objectivly.  But a problem with user interface design is that much of it is performed subjectivly without much evaluation of the objective attributes of the interface.  I believe that part of this could be from people simply not knowing that there are objective evaluations for a User Interface.  There’s several methods of evaluating user interface efficiency.  I won’t bother to name them here, rather I will refer you to the book “The Humane Interface” written by Jef Raskin (the developer of he Macintosh interface, and the 31st employee of Apple Computer).   Raskin covers both interface metrics and his philosiphy when it comes to designing and comparing user interfaces. 

Being armed with this knowledge I was able to express with hard numbers the inefficiency of the user interface in this product and point out where the designers went wrong and show how it could have been improved.  While the developers of this product did not make the suggested improvements during my time on the project I was able to properly set expectations for completion.  That’s very important to me since meeting expectations is onf of the performance metrics by which I am measured. 


From the BlogEngine Archives

Posts may contain products with affiliate links. When you make purchases using these links, we receive a small commission at no extra cost to you. Thank you for your support.

Mastodon: @j2inet@masto.ai
Instagram: @j2inet
Facebook: @j2inet
YouTube: @j2inet
Telegram: j2inet
Twitter: @j2inet