The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

"Illegal System DLL Relocation" -- thanks MS

One of the latest Windows XP SP2 security updates started causing some applications (including my software) to display an error message and fail.

More on this problem:
http://support.microsoft.com/default.aspx/kb/935448/en-us

After installing the hotfix, everything works well. But I am still getting many angry messages from peiple using my software. Has anyone had such a problem? I wonder, how should I use the MS Help control so that my app wouldn't fail?

I use Borland C++ Builder and link HHCTRL.OCX to my application using the LIB file.
HHCTRL user
Tuesday, May 01, 2007
 
 
I haven't experienced the issue but the knowledge base article suggests that you did nothing wrong.

"The Hhctrl.ocx file that is included in security update 928843 and the User32.dll file that is included in security update 925902 have conflicting base addresses. This problem occurs if a program loads the Hhctrl.ocx file before the program loads the User32.dll file."

In other words, Microsoft screwed up. If you know how to do so, you can always recompile your program to load the User32.dll file first. In the long run, you probably need to develop some consistent, "official" way of notifying your customers when Microsoft breaks something and offers a patch for it.

For example, you can make it a policy that whenever something likes this happens, you'll create a forum post on your web site with a description of the problem, an explaination, and a link to the patch. Next time Microsoft breaks something, write it up, post it on your forum, and whenever someone complains, point them to your post.

Set it up properly and make it easily correctable, and users will hopefully get into the habit of checking the forum first before calling you.
TheDavid
Tuesday, May 01, 2007
 
 
"Set it up properly and make it easily correctable..."

Err... that should have been to set it up properly and make it easily searchable.

As in, I get a mysterious error message/number, I go to the forums, I type that message into the search box, and I get one exact match.
TheDavid
Tuesday, May 01, 2007
 
 
Yes, Microsoft screwed up, but that probably costed me some sales. The program fails, people uninstall it, and then send me a feedback message through my website.

I have emphasized how to resolve the problem on the uninstall feedback page (as well as support page). But in many cases, it's too late. They have uninstalled it already, and don't want to install it again.

However, if they don't even bother reading, maybe they won't purchase the software anyway.
HHCTRL user
Wednesday, May 02, 2007
 
 
invoice bill g for your lost sales.
starving coder
Wednesday, May 02, 2007
 
 
Use rebase.exe or alternatively use the ReBaseImage function in your setup to fix the load address.

http://msdn2.microsoft.com/en-us/library/aa363364.aspx
Donald Duck
Wednesday, May 02, 2007
 
 
"However, if they don't even bother reading, maybe they won't purchase the software anyway."

You shouldn't require users to read ANYTHING.  Its your problem if they don't buy,  so fix it without the user requiring to do **anything**.
Donald Duck
Wednesday, May 02, 2007
 
 
It's hard to disagree. Thanks for the URL.
HHCTRL user Send private email
Thursday, May 03, 2007
 
 
So...  what do you do when you design your program for Windows XP with Service Pack 3, and some user tries installing it on Windows 98?

I don't think the situation is as cut and dried as Donald Duck thinks. You have to tell the user what's needed to run the software. If all they have to do is install a small security patch, you should make that option available to them.

Keep in mind that they had to install the first security patch in order to break the application in the first place. If they didn't do that, then this whole discussion is moot.

If they're the kind of customer who installs one patch from Microsoft, installs your program, whines about it broken and demands their money back, you've got a problem customer and probably shouldn't try to keep him.

In the long run, I think you should fix it. But I also think it should be part of your normal scheduled maintenance cycle, i.e., version 1.1.0. I don't think fixing your application as a knee jerk reaction to every patch Microsoft puts out, is healthy for you.
TheDavid
Thursday, May 03, 2007
 
 
Any setup program worth its salt should call rebaseimage to do address fixups at the time of installation.  At the time of installation it is known whether it is windows 98 or 2k or xp on which your program is being installed.  If the install of a new sp breaks your program, all you have to tell your user is to reinstall it and when the rebase function is run again, it will fix it up for the new service pack.

Anyway who uses windows 98 today? According to my serverstats it is rare.

My philosophy is that if the software can figure out how to do things it should not ask the user to do it.  It should not even ask me how to do it.  It should do it on its own. Otherwise what's the point of automation?
Donald Duck
Friday, May 04, 2007
 
 
>In the long run, I think you should fix it.

I thought in the long run, the problem would solve by itself as users automatically download & install new updates which fix the issue.
HHCTRL user Send private email
Friday, May 04, 2007
 
 
You've got to read between the lines on the MS KB article.  Users of pirated copies of windows can't get the patch that fixes the problem.
Grant Send private email
Friday, May 04, 2007
 
 
If you are using C++ Builder, why are you using the OCX instead of linking directly to the html help files?

You can download the HTML Help Workshop from:

http://www.microsoft.com/downloads/details.aspx?familyid=00535334-c8a6-452f-9aa0-d597d16580cc&displaylang=en
Billy Send private email
Thursday, May 10, 2007
 
 
I do use HTML workshop, but it looks like OCX is used anyway.
HHCTRL user Send private email
Thursday, May 10, 2007
 
 
No, its not.  I have several apps that use html help,  I can unregister the hhctrl.ocx completely and the help still works in these applications.

Are you calling the HtmlHelp function directly?

This code is from an MFC application:

BOOL ProcessHelp(CString text, CString helpFilePath)
{
    if(text=="")
        return (HtmlHelp(AfxGetMainWnd()->m_hWnd, helpFilePath, 0, 0)!=0);
    return (HtmlHelp(AfxGetMainWnd()->m_hWnd, helpFilePath, HH_DISPLAY_TOPIC, (DWORD)(LPCSTR)text)!=0);
}
Billy Send private email
Thursday, May 10, 2007
 
 
Billy, you aren't correct. I am calling that function directly. It is exported by HHCTRL.OCX:

...
DllCanUnloadNow
DllGetClassObject
DllRegisterServer
DllUnregisterServer
HtmlHelpA <
HtmlHelpW <
...

That's why unregistering HHCTRL.OCX would not affect any application that uses HtmlHelp() directly. But HHCTRL.OCX is used anyway, because the function resides in this library.

I have updated the code to dynamically load HHCTRL.OCX in run time, so the application doesn't fail at start. It *might* fail when someone calls help, but hopefully the try-catch will take care of that.
HHCTRL user Send private email
Monday, May 14, 2007
 
 
Yep, you are correct.  The exports are in the ocx files, not the other dlls.  My mistake.  I am surprised that we have never gotten any error reports based on this.
Billy Send private email
Tuesday, May 15, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz