Wednesday, May 22, 2013

Dead blog

Alas, I have not written anything in a long one. Truth is I have not touched Windows CE for ages. 
The only thing programming I did lately is a Chrome extension: extension-source-locator.

Just to close loose ends...

Sunday, July 3, 2011

Google Takeout

Google released recently a service to donwload all the information that one has stored in their services. I immediately wanted to try this in the hopes to recover my movies that I uploaded to Picasa, movies that one cannot download in the original form right now.

The service is intuitive and minimal as usual for a Google service. If only it would work as well...

The first problem was when it indicated that my Picasa archive will be 2 GB, a very surprising detail given the fact that I pay $20 to have 80GB, 50% of which I use. Apparently, there go my hopes for a copy of my movies... Nevertheless, I give it a try and press "Create Archive". A nice progress bar appears and marks the progress. When it reached 100% a download button appeared. Happy, I pressed the button and immediately received a "Page not found" error. Hmm... I must have done something wrong, right?

Tried it 2 more times and each time something else "happens", but the end result is the same - there is no way for me to download my Archive!

Maybe it is my fault somehow, or the fault of my computer's configuration. Maybe. However, this takes me back to the point that I just cannot understand how a company that gives me a service for payment ($20 remember?) does not have a customer service center...

This model of recent years of internet giants who deny customers a proper human response is annoying and worrying. Maybe that should be the next startup, a general purpose online customer service company that takes care of your complaint for a fee.

Monday, September 6, 2010

Using NKDbgPrintfW in the Compact Framework

In case you wanted to use RETAILMSG or NKDbgPrintfW in your C# code and was struck dumb when you saw that no Dll was specified for the function on the MSDN page have no fear.
As you may have guessed, you need to use Coredll.dll for the declaration. I tried and confirmed it.

public static extern void NKDbgPrintfW(string str);

Format the string before sending it to the native function to avoid the multiple variable stuff...

Tuesday, July 6, 2010

Make your OSDesign more readable

There are some unknown hidden tags to the sources file that can make the navigation through your OSDesign much easier and convenient.
One of these excellent tags is FILE_VIEW_INCLUDES_FOLDER. This excellent tag makes files such as txt,jpg, etc.. accessible through the IDE. Pretty comfortable!

Sunday, June 13, 2010

IOCTL_HAL_INITREGISTRY and its place in the boot order

I'll start by saying that this is intended for OEM platform developers.

When you develop an OSDesign it usually supports several hardware configurations. One of the first questions that arises is where in the boot process can we decide what is the configuration we are running on and which drivers should we enable. For this purpose Microsoft introduces IOCTL_HAL_INITREGISTRY.

This OAL IOCTL is called in the boot phase. The description by Microsoft is:
It is called before other applications are started, so the OAL can modify registry settings used by all applications.
This is where this post comes in. From what I have experienced, using Hive Based registry, the registry that is available in this function is the Hive Boot section. Any change that is done to the registry will be merged (override) to the boot phase of the device manager.

The delicate points to pay attention to are:
  1. Changes that have been saved before the last restart are not reflected in the current state of the registry.
  2. After this function finishes the device manager is loaded. This means that boot phase one relies on the updated registry. So, if you add driver entries in this functions you may encounter weird problems in the loading order of drivers (suddenly drivers will load in boot phase one when they were not supposed to be avialble yet).
To solve number 2 I use the following solution:
Say I have two hardware implementations for a USB controller (revision 1.2 of the HW has a differnet controller than revision 1.1). This means I need two different code paths to initialize the hardware. Admittedly, there are many ways to implement this, but what I do is put two different drivers in the source code and add two different entries in the registry. When the IOCTL_HAL_INITREGISTRY is called I update the flags entry of the corresponding drivers based on the revision of the board.

Additional reading:
How to set up an OAL IOCTL

Tuesday, March 9, 2010

All I wanted to do was move to GIT...

I received a simple assignment: move our svn repository to git.
You can skip to the end and read the steps to take or read the boring story that led to this blog post.

I thought it shouldn't be hard since our repository is local and you have git-svn. Well it's not that easy as well.
I must admit, I am lazy. I don't want to do it in batch mode and I don't want to be the master of git and svn to accomplish this. At the end I was forced to work in batch mode most of the time.

So I started by doing a simple google search and found the following blog:
Cleanly migrate your svn repository
Sounds promising!
My repository is located at C:\SVNRep so I typed:
git svn c:\svnrep --no-metadata
Once I issued the: "git fetch" I was warned that it could not find the svn repository.
Back to searching. Now I found this answer on StackOverFlow. I understood I am an idiot. No surprise there...
I tried to issue the following:
git svn file://c:/svnrep --no-metadata
The process started and I was happy.  BUT, I received another error: similar to "Permission denied: error line 2723" with a tmp folder that was not in my svn repository. Google dug an answer quite fast with this message:
Porting svn with an error
I thought I was done, but apparently I am not that talented when it comes to svn.

I downloaded the svn version I created the repository with (1.6.5) and ran the svnserve command only to find that git did not find the path I specified (svn://localhost/relative/svnrep/). I then downloaded VisualSVN, copied my repository to the repositories directory and created a user with the same name as the Windows user. I was now able to access my repository through the web with the user I created. So.... once again I hit:
git init http://shay-vm-git/svn/SVNRep/ --no-metadata
This time it worked!!! The process takes along time to finish.

To summarize:
System settings -
  • Windows XP SP3
  • VisualSVN with SVN 1.6.5
  • Git-
Objective -
Steps to take-
  • Read  Cleanly migrate your svn repository
  • Read Porting svn with an error
  • Install VisualSVN that corresponds to the SVN version of your svn repository
  • Create a user in VisualSVN with the same name of the user you are logged-on with in Windows
  • Copy your repository to the Repositories folder of VisualSVN
  • Right click the repository folder in VisualSVN and choose Browse
  • Copy the URL of your repository from the web page that opened and use it in the "git init svn_address --no-metadata" command
  • Wait a long time for the fetch to finish
Hope this helped someone.

Thursday, February 25, 2010

The new Windows CE Internet Explorer missing icon

The newly released Internet Explorer for Windows CE comes without a shortcut on the desktop. Annoying and funny that Microsoft missed that (and did not fix it via a QFE).

Not only they did not place a shortcut, but they also did not set an icon for the new application. This means that placing a regular shortcut will look odd since the shortcut takes the icon from the executable it points to.

I am adding a link to a subproject that adds an application with the IE icon that launches the new IE. The subproject also places a shortcut on the desktop.

The subproject is not built in case the component for the new IE is not chosen.

No warranty is given in any way. The code is supplied as is.