Disable Registry Reflection: How and Why

14. February 2006 04:35 by Csaborio in General  //  Tags:   //   Comments (0)
During our interoperability sessions we have talked plenty about the WoW64. We have touched base on topics such as changes that happen in the file system and in the registry. Of particular interest is the topic of registry reflection, which is the mirroring of keys from the 32-bit and 64-bit sections of the registry so that they share same information. If you recall, one of the many reasons why registry reflection happens is so that an out-of-process COM LocalServer (aka COM EXE) can be accessed by a 32-bit or 64-bit application. Even though this works like a charm, there are some cases in which you might not want your COM LocalServer to be registered to both 32-bit binaries and 64-bit binaries. Since Windows Server 2003 SP1, you can disable registry reflection on a specific key by using the following function: RegDisableReflectionKey http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/regdisablereflectionkey.asp By doing so, when this key is registered, it will not be reflected. Why on Earth would you want to do something like this? Say for example you are registering a 64-bit COM server that handles and sends data segments that are bigger than 4 GB to the caller. You would not want this COM server being accessed by a 32-bit application at all. That’s one I can think on top of my head, can you think of any other reasons on why you would like to use this function?

No really, what is the memory limit of my process?!

14. February 2006 04:35 by Csaborio in General  //  Tags:   //   Comments (0)
In our Intro to 64-bit, we mention that the limit for a 32-bit process (by default) in Win-32 is 2 GB. Likewise, we mention that the limit for a 64-bit process is 8 TB. I recently received a mail in which the author was telling me that he wrote a 64-bit app that requested memory by means of malloc and that it would stop around 6 GB, which was nowhere close to the 8 TB we talked about. After some e-mails back and forth I found the specs for his system: EM64T with 4 GB of memory. It just so happens, that the memory your application can use is limited by how big your page file is + the amount of physical RAM you have. In this case, the machine had 4 GB of RAM, the page file size was about 4 GB. If you open your task manager and look under the performance tab, you will find stats for "Limit" which is how much memory is available in your system. This number should be very close to your page file size + your physical RAM. You can change the Page file size under the performance properties of your computer, and by doing so, you could modify the settings so that your "Limit" can increment. In our tests we incremented the page file size to 11 GB. When our "memory hog" application was running, the limit was dynamically increased and could allocate about 17 GB of RAM. Keep in mind that the more paging you are doing, the slower things will be.

The "man" talks about it...

28. April 2005 23:14 by Csaborio in General  //  Tags:   //   Comments (0)
Well, x64 Windows XP and Server 2K3 versions have long been awaited and they are finally here. Two days ago, at the WinHec convention, Bill Gates introduced these two versions into the Windows OS family. Now we only need Whidbey and Yukon on 64-bit and the rest will follow. You can watch a webcast at the following url: http://www.microsoft.com/events/executives/billgates.mspx

Yes Virginia, you can enable alignment exceptions on x64

28. April 2005 22:54 by Csaborio in General  //  Tags:   //   Comments (0)
I received the feedback forms from the Paris event a while back and noticed the comments from Gilles Vollant in which he suggested we touched a bit more on the 64-bit alignment issues. After exchanging mails back and forth a bit, it seems that it is possible enable x64 exceptions on an x64 machines (by default, these machines handle the exceptions in-hardware and only suffer a performance hit). Why on Earth would you like to change this? Well, if you are a developer writing software for 64-bit systems and would like to rid your software of alignment faults, it would be quite difficult to do so without knowing where/when they occur. Here is an excellent article Gilles Vollant wrote about alignment on both architectures: http://forum.winimage.com/viewtopic.php?t=137 I have not yet tested this and once I get my hands on some machines next week at the Canada event next week, I’ll investigate some more and post any issues I may find.

To image or not to image...

17. April 2005 10:58 by Csaborio in General  //  Tags:   //   Comments (0)
"Do not sleep during the day, that will only make your jetlag worse!". That's what I've been told numerous times - I wished I had given attention to the advice. It is now midnight here in Copenhagen, a day prior to the event and I am nowhere close to falling asleep. So I thought I should make something productive and that will quickly send me to bed, which is why I am going to talk about imaging an x64 workstation. Many, if not all, imaging programs out there will not work under Windows-64 bit at the time of this writing. We have booted from floppies that used Drive Image in DOS mode in the past, but this method is super slow and I personally have something against floppies – no one should use them anymore! In order to automate the imaging process for our workstations, I decided to install a secondary OS on these images – Windows-32 bit. Once this was done, I used Macro Express to automate the restoring procedure with Drive Image once the machine was booted in 32-bit mode. The process takes now 5 minutes (vs. the 60 that it took before) and requires no floppies. Some may ask why not use TrueImage or Ghost instead of the discontinued Powerquest Drive Image. It’s just a matter of preference – I have found Drive Image’s installation and usage a lot simpler than its competitors. Feel free to use your personal image restoring procedure, your outcome should work just the same.

Route64 Paris

12. April 2005 10:45 by Csaborio in General  //  Tags:   //   Comments (0)
It really takes no culinary experience to discern what the following ingredients are a recipe for: -24 Machines -26 attendees -24 Missing Power Cords -1 Faulty Projector -26 Missing Booklets -2 Tons of Stress (1 per presenter) It certainly sounds like a perfect recipe for disaster. The first day at Paris has been the most stressful – no doubt about it. It would seem that with the aforementioned ingredients, we would be destined to fail miserably, but thanks to very hard work and support from a lot of people, we managed to find solutions for every one of the problems we faced in the time required. . Au contraire to most events, we had a Microsoft speaker who has been involved with Route64 for some time – Christophe Lauer. Mark from HP and Laurent from Intel (who kindly helped us with power cable issues) followed with their respective keynotes that presented the HP offers and information on Intel’s commitment to their customers who are porting to 64-bit. The C++ was of particular interest to the presenters. Even Gilles Vollant (Microsoft C++ MVP) mentioned that had learned quite a bit, specifically in the alignment/padding section. Many people were interested with VAS and had a plethora of questions which were correctly addressed. It seems as in every event there is something unique - in the case of Paris, it was the fact that the hotel almost burned down - and no, our machines were not the ones responsible :) The fire alarm went off during the last day at 3:00 p.m; it seems a room on the third floor was on fire. Firemen came over to the Marriot at Champs Elysee and managed to put the situation under control. Make sure you check out the Paris gallery to see the pics of the firetruck in front of the Marriot, quite an unusual site!

Route64 London

12. April 2005 09:59 by Csaborio in General  //  Tags:   //   Comments (0)
Two weeks ago we had the great opportunity of flying across the Atlantic and head out to London for the 3rd Route64 event. We flew on a Sunday and arrived Monday completely jet-lagged. The people from WinGear had some issues finding power cables for the 24 machines that we needed for the event. Fortunately for us, the people at Microsoft Chertsey had plenty of spare ones and made our life a lot easier. We were astonished on how punctual the English lads are - some were waiting at the venue 1.5 hours before the event started! The Microsoft Chertsey training center was amazing. We had three projectors that simultaneously displayed our presentations – this made it possible for all attendees to have a perfect view of what was going on. The projection system was created by Barco Designs, which coincidentally had sent one of its employees to the Route64 event. He had most of his code ported and reached brick wall when he found that he did not have some required libraries for his project. Overall, the labs went extremely well. We received great comments such as “information provided was clean and concise” to “well structured examples with enough ideas and examples for relative novices to grasp the fundamentals of porting 32-bit to 64-bit. Thanks!” We really enjoy receiving positive feedback at the events, it makes everything worthwhile. Make sure you check out the London Gallery Section of pictures of the event!

Route64 Houston

12. April 2005 09:07 by Csaborio in General  //  Tags:   //   Comments (0)
A while ago was the first event in the Route64 series and I am very happy to say that it went great! We had a great audience, very interesting people quenching for 64-bit knowledge. I talked with many of them and they really liked how the content was given. Some mentioned that these trainings had been the best that they had attended in 10 years or so – really cool stuff! So what’s so different from these training events to other ones out there? I believe that the best part of our training is that there is no marketing mumbo jumbo – we want you to learn and we start teaching you in the first session. Another thing that separates our labs from the rest is way in which we present the sessions: we lay the theory on the table, show you how this will affect you and the problems that will arise and we give you not one, but many solutions for you to chose from. You also get to take home booklets from all sessions with ALL the covered information – this way you can always have reference materials to which you can come back when in doubt. Make sure and read some of the attendee comments from the Seattle event, I think they are great.


12. April 2005 09:05 by Csaborio in General  //  Tags:   //   Comments (0)
Hello and welcome to my first blog entry. Let’s start with a little introduction…my name is Christian Saborío and I work in San Jose, Costa Rica with a company called Artinsoft. I have been a trainer for the HP/Intel/Microsoft 64-bit developer forum for quite some time now…I believe it will be a year very soon, amazing how time flies The 64-bit developer forum is a joint effort by Microsoft, Hewlett Packard, and Intel to raise awareness on 64-bit and to train people in specific areas when porting applications to 64-bit. The first event on these series was in Boston. The tour then followed Santa Clara, Phoenix, New Jersey. There are other events planned for this year but have not yet been confirmed. I’ll make sure to keep you posted when I find out the exact dates. So what’s the difference between this forum and Route64? In a nutshell, we offer the same courses and have the same support. These courses are not meant to compete with one another; but rather to bring these great labs to a wider audience. The forum offers an introductory price and you get to take a 64-bit machine with you. Route64 price is not bundled with a machine, but get a special discount when you sign up for this event.