Registry Example (Chapter 25) & Vista
I really like this book!! I am working on my first C# project (after many years with other programming languages)
But I have a problem with the Self-Placing Window example in chapter 25. This sample app writes to the HKLM (Local Machine) part of the Registry. I wrote something similar (to store licensing information) and it works fine on my Windows XP development PC, but when I tried to run it on Windows Vista, Vista doesn't allow writing to HKLM.
So it looks like you left out an important detail, unless I'm missing something - which is always possible.
I have no problems writing to the Current User area of the Registry on Vista.
Prior to this project, for the last several years, I have been writing Windows applications in Delphi and using the Registry extensively, so I am quite used to it.
BTW, one criticism I have of this book is its failure to acknowledge the heavy debt that C# owes to Delphi. They were developed by the same person and have much in common. Delphi was a significant breakthrough when first introduced and I still use it extensively.
Michael Bate
|