VMware-authd.exe slowing down my PC

I was doing some work on one of my PC’s and I had the processes list open in Task Manager. Out of the corner of my eye, I noticed that one process, VMware-authd.exe, was going from 0 to 10% of the CPU. I didn’t know what that process did, I went out on a limb and assumed that it was somehow related to VMWare. VMware is one of my favorite tools, but I wasn’t running any VMWare sessions. Time to go Googling. Apparently it’s a service that provides administrator priviledges to to a running VMWare session if the host use isn’t logged in with administrator access rights

If you are logged in with admin rights, you don’t need to have this service running. VMware-authd.exe is the name of the executable for the “VMware Authorization Service” service. You can go into Services and shut that service down and then set it’s startup type to “manual”. There are no other services that depend on that service to be running. You can also stop the service from the Windows command line with the following:

net stop VMAuthdService

[Edited on 3/5/08]

If you need to restart the service from the command line, use the following:

net start VMAuthdService


Today our main app’s help system broke.  I hate that when it happens.  This app is built with Delphi, which supports WinHelp (*.hlp) files for context sensitive help.  A long time ago, I added some code to allow our apps to use HTML Help (*.chm).  It was fairly trivial to implement and once I got it working, we never had to look at that code again.

Until today.  The latest build of the help file didn’t work.  We pressed the help button and nothing happened.  Yet, if we ran the help file outside our app, it loaded up just fine.  Obviously something had changed, the question was what had changed.

The first step was to fire up the app and step through the code.  To use HTML Help with Delphi, I use some open source code that provides a Delphi wrapper for the function calls in hhctrl.ocx.  When I stepped through the code,   I ended up here:

h := HtmlHelp(0, PChar(mHelpFile), HH_HELP_CONTEXT, 5000);  // data = helpcontext id

The mHelpFile variable is the full path the .chm file.  HtmlHelp mapped to HtmlHelpA in hhctrl.ocx.  5000 the context id for the start page in the .chm.  It’s set to 5000 because nothing defaults to that value.  If the context id’s are not defined correctly, it wont have a context ID of 5000.  The code would call HtmlHelp and 0 was being returned.  In this context, 0 means that the context id of 5000 doesn’t exist in the .chm file.  It’s the same thing as calling the HtmlHelp executable, hh.exe, with the -mapid parameter.

hh.exe -mapid 5000 myfile.chm

So that’s my theory, next step is to prove that ID’s are missing or incorrect.  The guy who generated the .chm file was gone for the day and I don’t have to toys used to create the .chm file.  But I did have the .chm file.  Keyworks has a nice (and free) utility called KeyTools for working with HTML Help files.  One of the things it can do is to decompile the .chm file back to the source files.  I did that and opened up the .hhp file and sure enough the context id’s were all wrong.

Delphi Interview Questions

Nick Hodges posted a list of interview questions for Delphi programmers. While I usually like his posts, I didn’t agree with this one. I’ve been using Delphi since version 2 and I would get a brain freeze if I got all of those questions in an interview. I know them all, but to repeat them back in an interview, that’s not going to happen. The sole exception would be writing of a function to reverse a string. If I was interviewing someone, I would make them write a function like that. It shows how they think and hopefully what processes they are accustomed to following.

Another thing I do is to describe a wierd bug that would have been submitted that no one could reproduce and ask the interviewee what steps he or she would take. I would describe a real of fictious application (it really doesn’t matter) and then describe a loose series of steps that will crash the application, but only on a certain. You can adapt the description to match the perceived skill level of the applicant. This is closer to real life and you can hopefully learn a few things about the applicant. How does he react under stress? How well does he know the debugging tools and methodologies. You’ll want to see what steps or directions he would go in order to isolate and reproduce the problem.

I would also ask some generic SQL questions. Every job that I ‘ve had (OK, it’s a short list) has involved SQL at some level or another. I don’t think you avoid databases and every programmer should have some level of familiarity with SQL.

The rest of the questions in Nick’s list show that you have memorized the help system, it doesn’t tell you if you actually know to use it. Unless you are writing components, how important is it to enough about how components are read in to repeat it back in an interview. In our shop, we have 7 developers who use Delphi. Only one of us (me) has any real experience in writing a new component from scratch, and doing it the right way. And that’s OK. We’re not in the component development business, we’re in the business of writing applications.

These questions would weed out a skilled programmer who never used Delphi. I would greatly prefer getting an experienced programmer up to speed with Delphi, then dealing a programmer with Delphi experience, but otherwise horrible.

Here are some suggested Delphi interview questions:

  1. Describe how components are loaded from a DFM file at runtime.
  2. What is the difference between TGraphicControl and TWinControl?
  3. Write a function that reverses a string.
  4. If a component has another component as a property (example:  TDatasource has a TDataset component as a property), what happens if the “pointed to“ component is deleted?
  5. Where does TCustomControl fit into the VCL heirarchy?
  6. What is the purpose and significance of the TPersistent class?
  7. What are the three methods required for an implementation of IInterface?  What do they do?
  8. What class in the VCL heirarchy implements IInterface?

from [Nick’s Delphi Blog]