Replacing the default Windows calendar with .NET hooks

Nov 23, 2013 at 10:30 AM
Edited Nov 30, 2013 at 11:28 AM
It's (the end of the) 2013 and we still don't have a true and native Persian calendar on windows machines. 1382/7/15 is a Persian date and I'm sure, it makes no sense to a lot of you. We (Iranian) have the same feeling about the 2013/10/8. It's meaningless to us, because the different parts of a Gregorian date don't match to a Persian date. We don't know 10 here means our 10th month or not. Linux machines have not this issue at all. It's open source and easy to change and it already has a true Persian calendar support. How about Windows? No, we can't change its default calendar and we need to find another solution to change or alter the native windows API method calls to replace the default output of the system, with our own implantation.

By using easyhook and intercepting GetTimeFormatW and GetDateFormatW method calls of explorer, I've changed the output of the Windows date and time strings:

Image

Image

Image

You can download this open source project from here:
http://www.dotnettips.info/file/projectfile?name=ExplorerPCal.V1.0.zip

This project works fine with Windows XP and Windows 7. But it seems easyhook is not compatible with Windows 8 and it has no effect on it.

Read more
Dec 24, 2013 at 5:55 PM
Hi Vahid
would you let me know more about the exceptions you get? what do you mean by compatibility in windows 8?
Dec 24, 2013 at 6:31 PM
Hi namazikhah,
There's no exception here. It installs the hooks successfully at the target process, but my hook's callback won't be called at all in Windows 8.