Friday, September 09, 2005

On rebasing and other fun stuff

I wrote this article last month to contribute to the RTO Newsletter. They haven't published it as yet (and I am not sure if they will) But here it is in all its glory:
Server Rebasing:

Many years ago when Server Based Computing was still in its infancy I had the opportunity to get to know a guy named Kevin Goodman.  At that time he had been working for a company called SoftBlox and had helped write a cool set of utilities called Appscape that he wanted me to look at. One of the utilities was a way to disable the X close from an application. SoftBlox went by the wayside but I maintained (and still do) the utilities that they had me distribute free for them when they were sponsoring my site at Incidentally if you now want to prevent users from clicking on the X and closing the RDP client take a look at this FAQ item I created at: of an interesting way to do it.


Upon leaving SoftBlox, Kevin along with Bernd Harzog, approached me with a project he had been working on.  He explained to me about the memory problems inherent with the loading of an applications dynamic link libraries (dll’s) multiple times within the Terminal Services Environment. He had an idea of a utility to fix the problem and asked if I would help test it out and give him some feedback. We did a case study with the library I work for about our success of the product ( ) and I became one of Kevin’s first customers. A few months later, Kevin started Kevsoft and named the product TScale, which was renamed RTOSoft Tscale a few years later, then Citrix purchased the technology to add to Citrix Presentation Server 4.0 and now the rest is history. Kevin is now the CEO, Founder, and VP of development of RTO Software. 


What made me reminisce about this was Kevin’s recent Pod cast interview with Brian Madden. ( While listening to the interview Kevin mentioned the term rebasing of dlls, which is the magic that Tscale does and also mentioned several utilities, one of them being the Microsoft utility called Rebase.exe which piqued my curiosity. In the interview Kevin gives a very concise description of the rebasing technology behind Tscale and it really is worth giving it a listen. 


In simple terms, the problem Tscale solves is one that is not exclusive to the Terminal Services environment but is exacerbated by it. When any windows application loads, it starts along with it, several dll’s.  These dll’s are loaded into a fixed location in upper memory. The problem comes from when a user goes to load another application and that application wants to load its dll’s into the same memory space as an application that you have already loaded. This results from either poor programming or multiple instances of the application running.


So what happens when you are running the SAME application multiple times as you do in the Terminal Server environment? The answer is that the dll’s try to load over the top of each other and cause what is known as a race condition. It basically causes the CPU of the server to go nuts. The solution that Kevin found?  Effectively rebase, or in effect move the dll’s in real time to an open portion of memory.  Thus Tscale was born.


If you are an application developer or tinkerer you can attempt to rebase your DLL’s using the Microsoft Rebase.exe tool found in the Server 2003 SDK available for download at: More information about the rebase.exe tool can be found here on the Microsoft MSDN site:


However this material is not for the faint of heart and if you want to manage you’re applications in the most efficient way via a graphical interface, buying TSCale is the best way that I know how to do it and requires a whole lot less work!


Jim Kenzig

Copyright 2005



No comments: