On mySimon: Samsung 55" LED TV
BNET Business Network:
BNET
TechRepublic
ZDNet
TalkBack 3 of 12:
Next »
« Previous
Patch didn't affect properly coded applications
The "problem" is that user32.dll and hhctrl.ocx share the same "preferred base address." This isn't normally a problem, because when an app calls LoadLibrary("hhctrl.ocx"), the OS Loader will say "oh, user32.dll is already using your preferred base address, so I'll remap you to a different location."

So why are RealTek et al encounterin a problem? Because thy are NOT loading hhctrl.ocx dynamically (i.e. via LoadLibrary) -- they're directly linking to it. Direct linking will fail with conflicting base addresses.

So why are RealTek et al directly linking to hhctrl.ocx directly? Beats me. If you follow the documentation* on how to use the HTML Help API, all you need to do is #include , and link with htmlhelp.lib. If you do this, your application will correctly dynamically link to hhctrl.ocx. For whatever reason, RealTek et al are directly linking to hhctrl.ocx, and are now feeling the pain of their mistake.

* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/vsconOvaccessing.asp. An few excerpts: "To gain access to the HTML Help API, you link to the Htmlhelp.lib file and include the Htmlhelp.h file in your Windows program." "Htmlhelp.lib is an export library that exposes the HTML Help API and loads Hhctrl.ocx only when HtmlHelp() is called. In addition, Htmlhelp.lib locates the registered Hhctrl.ocx." Seems crystal clear to me.
Posted by: PB_z   Posted on: 04/09/07 You are currently: a Guest | Members login | Terms of Use

Alert moderator to an offensive message

Subscribe to this discussion via Email or RSS

Microsoft to push fix for patch trouble  Loverock Davidson | 04/09/07
No, Rockhead, ...  OButterball | 04/09/07
Patch didn't affect properly coded applications  PB_z | 04/09/07
It ain't that simple, PB_z  OButterball | 04/09/07
Can't really fault that logic...  jasonp@... | 04/10/07
Uh, oh, jasonp...  OButterball | 04/10/07
Linking directly to hhctrl.ocx was never "allowed"  PB_z | 04/10/07
Do you do all this commenting on company time?  deleweye | 04/10/07
I'd guess 3-5 mins/day  Jack-Booted EULA | 04/11/07
Here we go again!  Reverend MacFellow | 04/09/07
patch the patch  bfsteel@... | 04/10/07
Patches to fix the patches  Chad_z | 04/10/07

What do you think?

SponsoredWhite Papers, Webcasts, and Downloads

advertisement
advertisement

SmartPlanet

Click Here