July 2007 - Posts

Goodbye Canada

Sorry for the lack of activity on my blog. We’re less than a week away from departing for the UK and it’s been quite hectic trying to get everything finished. We’ve unfortunately also had some serious setbacks. From the moving company completely letting us down, to me contracting a rather serious illness, to my web hosting provider apparently taking all my domains down. Fortunately they were quick to rectify the situation.

If it happens to go down again and you need to get a copy of Window Clippings you can download version 2.0 here.

The other issue I should just point out is if you purchased a license of Window Clippings and have not received the email with your license key please check your spam/junk mail folder. The license keys are mailed out automatically and immediately after purchase. If you cannot find it, simply send me an email but please be patient as I may be offline for days at a time over the next few weeks.

I’ll be back online in a few weeks – let’s hope there aren’t too many more serious hurdles!

© 2007 Kenny Kerr

Posted by KennyKerr with 6 comment(s)

Windows with C++: Windows Vista Control Enhancements

The August 2007 issue of MSDN Magazine is out and features my new column entitled Windows with C++. It will initially be published every other month and focuses on Windows Vista and Windows Server 2008 development using C++. As with my Cryptography Next Generation article, each column includes a “What about .NET?” sidebar that showcases how the various techniques discussed in the article can be used from managed code using either C# or C++/CLI.

The first column introduces many of the control enhancements introduced in Windows Vista.

Windows with C++: Windows Vista Control Enhancements

Windows Vista doesn’t introduce many new controls (though it does provide the new Network Address Control, which allows input and validation of IPv4, IPv6, and DNS names), but it offers a number of enhancements and new features to many of the existing standard and common controls. This is good news in a way because it means you can take advantage of many of these new features in your applications with very little effort. In this column, I am going to take you on a whirlwind tour through some of the most commonly used controls and look at various new and exciting features that are provided by Windows Vista and beyond.

Enjoy!

(The various screenshots in this issue don’t look too good online. Hopefully the print edition is in better shape.) Fixed!

If you’re looking for one of my previous articles here is a complete list of them for you to browse through.

© 2007 Kenny Kerr

Posted by KennyKerr with 9 comment(s)

Notebook Update

Last month I mentioned that I really need to get a notebook before leaving for England. I was considering either the Dell Latitude D630 or the Lenovo ThinkPad T61. The Dell because I’ve used Dell for years and they’ve never let me down and the Lenovo because it is generally considered the very best notebook on the planet and I really wanted something just a little better than the Dell notebooks I’ve used thus far.

Well Lenovo completely let me down. Their notebooks might rock but their customer service is terrible (at least in Canada). I ended up calling Dell and ordering the D630. I had never called Dell before but instead simply configured and ordered systems online as their website is decent and provides good configurability but I had some specific requirements and wanted to make sure they were met. Specifically I needed the notebook to arrive promptly (before we leave for England) and wanted to make sure that the system included an Intel Turbo Memory module.

Well the salesman assured me that the notebook would arrive within 2 weeks and that the system comes equipped with an Intel Turbo Memory module. I got a good price and waited for the system to arrive. That’s when things started getting a bit uncomfortable.

First, I noticed that no Vista x64 drivers were available. I called and Dell shipped me the resource CD … which didn’t include any x64 drivers. Sigh. Fortunately, the next day they uploaded the drivers to their support site. Great!

Second, I noticed that the notebook had an estimated arrival date of 26 July, quite a bit more than 2 weeks. Fortunately the notebook arrived in the first week of July. It would be useful if the estimated arrival date was a bit more accurate.

Lastly, I’ve unfortunately discovered that the notebook does not include an Intel Turbo Memory module. I’ve been had. It looks like the outsourced Dell salesperson (in India) was just telling me exactly what I wanted to hear to make the sale. I have tried contacting Dell about this but have yet to receive a response.

Still, I’m happy with the notebook and it apparently has a slot for the Turbo Memory module should I pick one up in future. I also ordered the system with the minimum amount of RAM and installed 4GB of RAM that I purchased at Canada Computers saving me hundreds of dollars.

In case you’re interested here’s what I now have:

Dell Latitude D630
Intel Core 2 Duo 2.2GHz (4MB L2 cache and 800MHz bus)
4GB RAM 667MHz (from Canada Computers)
NVIDIA Quadro NVS135M (128MB or video memory)
14.1 inch WXGA+ LCD
120GB 7200 RPM drive
Intel A/G/N internal wireless and Dell Bluetooth
Windows Vista Ultimate

Despite the headaches it is a great notebook with lots of power. Below is the Windows Experience Index. The overall result is a bit low since it only has 128MB of video memory but the processor, memory and hard disk numbers are more relevant for me and they’re all good.

© 2007 Kenny Kerr

Posted by KennyKerr with 2 comment(s)

Manifest View 1.0

Every so often I need to view an application’s manifest, for example to debug application dependencies or to confirm the requested execution level.  This usually involves opening up the binary application file in Visual Studio and exporting the RT_MANIFEST resource to a text file that I then open in Notepad. Needless to say this is very tedious. Well tonight I had enough of this and whipped up this little tool.

Manifest View simply reads the manifest embedded in the selected file and displays it in a browser control. It’s simple but effective. It also automatically reloads the manifest when the Manifest View window receives the input focus. This is useful if you’re viewing a manifest and then switch to Visual Studio to rebuild and then switch back to view the changes.

You can download Manifest View 1.0 here. It works on both x86 and x64 editions of Windows and can read manifests embedded in either 32-bit or 64-bit PE files. It does however require the .NET Framework 2.0 to run.

Update: build 1.0.0.2 adds support for x64 editions of Windows XP and Windows 2003.

Update: build 1.0.0.3 adds support for DLLs.

Enjoy!

© 2007 Kenny Kerr

Posted by KennyKerr with 14 comment(s)

News flash: Microsoft is coming to Vancouver!

Today I woke up to the news that Microsoft is opening the first software development center in Canada and Vancouver is the lucky city that gets to host it. Here’s the press release. They must really have taken my little blog entry seriously!  :)

I must say I was surprised by the number of emails that I received today letting me know about this announcement. Rest assured I got the message. Unfortunately it seems to be coming too late for me. We’re just 4 weeks away from departing Canada for good and it would take a mighty compelling offer to convince me to stay.

Either way its great news for Microsoft and Canada and the many talented developers that live here that might be interested in an opportunity to affect the lives of millions of people by building great software and services!

I’m going to miss Vancouver...

© 2007 Kenny Kerr

Posted by KennyKerr with 2 comment(s)

How to learn C++ (and Windows development)

Every few months I get asked for book recommendations for learning the C++ programming language and then how to get started with Windows programming with C++. I don’t buy into the “C++ in 10 days” school of learning but rather advice readers to read books that will provide them with a good foundation.

Be warned: this is not for the faint of heart. If you’re looking for a gentle introduction to Windows programming then you should learn C#, but if you’re looking to “go deep” with Windows then you need to follow the C++ track, even if you eventually migrate to C# for some of your application development needs.

Here is what I recommend.

Start by working through The C++ Programming Language (3rd edition or special edition) by Bjarne Stroustrup, the creator of C++. This book will teach you what is generally referred to as Standard C++ and should apply to any C++ compiler on any platform.

The next step is to learn the fundamental building blocks of Windows applications. I’m talking about processes, threads, memory management and dynamic link libraries. Work through Programming Applications for Windows (4th edition; previously called Advanced Windows) by Jeffrey Richter. Unfortunately it appears to be out of print. There is always the Windows SDK to fall back on.

To build rich user interfaces I suggest you pick up a copy of Programming Windows (5th edition) by Charles Petzold. I honestly haven’t spent that much time with this book as I prefer to dig into the Windows SDK directly but this book is very well regarded and covers the essentials of windows and messages, basic graphics programming, keyboard and mouse input, etc. I also have to mention Programming Windows with MFC (2nd edition) by Jeff Prosise as it is a fantastic book and really helped me when I first started programming (with the 1st edition). I cannot however recommend MFC for those that are starting out as I consider it a legacy library. ATL combined with WTL provide a much more compelling solution for C++ programmers targeting the Windows operating system.

The .NET Framework may completely replace COM in the long run but COM is still very much alive today and must be understood if you want to take advantage of all corners of the Windows SDK. Essential COM by Don Box is all you need. This book is every bit as relevant today as when it was first released in the NT 4 era. To get up to speed on subsequent advances to COM you simply need to read the articles Don published in MSJ and MSDN Magazine since then.

The final book you need to read before we turn our attention to managed code is Programming Windows Security by Keith Brown. This book will help you to understand what principals and authorities are, how principals are authenticated, how access is enforced (authorization) and how authentication is achieved on a Windows network. This is essential information for any Windows developer.

The .NET Framework is the next (last?) major runtime you need to internalize. CLR via C# (2nd edition) by Jeffrey Richter is all you need here. There are some other good .NET books but this one will not only introduce you to C# but give you a good understanding of the Common Language Runtime and the .NET Framework.

In some ways the .NET Framework represents the future of development on Windows and C++ is ideally suited to get you there. I wrote one of the first articles on C++/CLI before the compiler even knew how to deal with it but if you really want to dig into C++/CLI and you should pick up a copy of C++/CLI: The Visual C++ Language for .NET by Gordon Hogenson.

There are many more books that I would recommend but the ones I mentioned thus far should give you a great start. Hope that helps!

© 2007 Kenny Kerr

Posted by KennyKerr with 8 comment(s)
More Posts