Oh no, you're thinking, yet another cookie pop-up. Well, sorry, it's the law. We measure how many people read us, and ensure you see relevant ads, by storing cookies on your device. If you're cool with that, hit “Accept all Cookies”. For more info and to customise your settings, hit “Customise Settings”.

Review and manage your consent

Here's an overview of our use of cookies, similar technologies and how to manage them. You can also change your choices at any time, by hitting the “Your Consent Options” link on the site's footer.

Manage Cookie Preferences
  • These cookies are strictly necessary so that you can navigate the site as normal and use all features. Without these cookies we cannot provide you with the service that you expect.

  • These cookies are used to make advertising messages more relevant to you. They perform functions like preventing the same ad from continuously reappearing, ensuring that ads are properly displayed for advertisers, and in some cases selecting advertisements that are based on your interests.

  • These cookies collect information in aggregate form to help us understand how our websites are being used. They allow us to count visits and traffic sources so that we can measure and improve the performance of our sites. If people say no to these cookies, we do not know how many people have visited and we cannot monitor performance.

See also our Cookie policy and Privacy policy.

Unhelpful Microsoft help denies helpless millions help

What does this button do?


Stob Here is a little contest, to which all fellow Windows programmers are invited. What is the API function LockWindowUpdate for? How might you use it? You are definitely allowed, nay encouraged, to use the official Microsoft documentation.

Here is the function description on MSDN, and here is the same documentation on the upgraded, new MSDN2, presumably so-called because it takes twice as long to display (Really. MSDN-1 takes 8-10 seconds here, versus 15-20 seconds for MSDN2, depending on time of day. Try it. Or better yet, choose your own function for the experiment, in case some MS wiseacre does a little spot of optimisation)

I first came upon this entry about 10 years ago or more, when I noticed that an MDI app that I had made used to flicker like mad while the code was opening up a shed load of database tables. I wanted to stop this. Searching MSDN on CD-ROM, I eventually stumbled on LockWindowUpdate, which from the cited function description looked like the business. So I wrapped up my update code in an exception-protected pair of calls, and congratulated myself on an excellent spot in the face of the sprawling hugeness of the Windows API.

I have previously mentioned Raymond Chen's blog. I recently came across this series of onetwothree,  four and five articles, but the passage that secured my full attention is this bit from number four:

People see the "the window you lock won't be able to redraw itself" behavior of LockWindowUpdate and use it as a sort of lazy version of the WM_SETREDRAW message. Though sending the WM_SETREDRAW message really isn't that much harder than calling LockWindowUpdate. It's 20 more characters of typing, half that if you use the SetWindowRedraw macro in <windowsx.h>.

Gah?

So, just to get this straight, people who call LockWindowUpdate are lazy, are they Mr Chen? That would be as opposed to people who are so lazy that, for example, they don't bother to document their own API, eh Mr Chen?

Mr Chen's articles say, believably, that LockWindowUpdate is exclusively intended for dragging operations. You lock somebody else's window, you draw your dragged stuff on top of it, it can't mess up what you draw because you've locked it. There. I just accomplished in 25 odd words what MSDN fails to say in 10 times as many – ie to describe the intent of the function.

Because there is absolutely no way you can get from the information supplied in the MSDN to the intended purpose of this function, as explained by Mr Chen. You stand no chance whatsoever. The reference I gave you above makes no mention at all of this dragging stuff: not a scintilla of a sniff of a soupcon of a suggestion. Absolutely zip. If you relied on MSDN's entry of this function, you would never, ever use it correctly. You are dead meat.

Ok, so the function reference page is pants. What about MSDN's overview material? Mr Chen mocks those who have not read it ("there's more to documentation than dry function descriptions, people!"), but since there's no direct link to it from the function page, why would you find it? (And why isn't there a direct link? Easily generated automatically by a suitable program, I offer this to Microsoft as a free idea to improve MSDN at one bound, and generously undertake not to apply for a software patent for it)

By my reckoning, a minimum of three lucky clicks – at 20 slow seconds a shot on drive-time MSDN2, remember – will bring you to this page. What a disappointment when you get there. Instead of explaining how you, the punter, can use the function, it mostly discusses how "the system" (ie Windows itself) draws a "tracking rectangle". This is probably an excellent example if you happen to use Microsoft's jargon for "tracking rectangles" (I think from Mr Chen's discussion it means the XORed boundary line you used to get when dragging windows back in the days before they painted content on the move; a little picture would be good here). And, of course, if you happen to have the relevant Windows source code to hand.

As it is, I say the entry is more or less useless, although I admit, when you know what it is trying to say, it does corroborate Mr Chen's explanation of the function's purpose.

I suppose it's possible Mr Chen was attempting a joke with this "lazy" business. He complains at the end of his series that his jokes have been misunderstood. Reading carefully through the sequence, I haven't found anything at all that I believed was a joke, so it is therefore feasible that this is what the "20 more characters of typing" stuff is intended to be. I have to tell him that "Hahaha! Look what I know that you don't know because we don't tell you," doesn't feel very funny when viewed from outside Microsoft.

In the follow-ups to his blog, many others have raised the points I make here. What does Mr Chen think? In an early reply, Mr C hands out defensive guff about

the tension between "descriptive" and "prescriptive" documentation

which would seem to imply that he supports the MSDN stew that we find. But then later on he distances himself haughtily:

It appears that everybody is under the impression that I approve of the documentation

Yes, I wonder why that is?

Mr Chen surely knows that MSDN's coverage of LockWindowUpdate is a load of horse poo. He is able to supply an intelligible description of how it is supposed to be used, and his opening salvo in the first article ("Poor misunderstood LockWindowUpdate") makes it clear that he is aware that almost nobody outside the charmed circle groks it. In the past, Mr Chen has occasionally taken pride in  shooting down other Microsoftees when he thinks it is deserved. Why, then, does he hold his fire here?

How about this: because LockWindowUpdate is entirely typical of MSDN. The whole, bloated thing is jam-packed with function descriptions that tell you everything about the function except what you need to know, huge, dull, explaining-by-not-explaining articles extracted like rotten teeth from MSDN Magazine and its predecessor MSJ, and filled with bogus enthusiasm for, say, this month's approved way of interfacing to databases.

Then there are the dreadful, slow searches, compulsory in the CD-ROM only days, now happily alleviated by Google (What is it about Microsoft and indexed searchable text? They always seem to get it badly wrong: think Windows Search, think those old help file indexes that always needed rebuilding). And why the almost complete absence of pictures? This is, after all, supposed to be the documentation for a graphical operating system.


Other stories you might like

  • To our total surprise, Apple makes adding alternative payment systems to iOS apps 'painful, expensive, clunky'

    Developers fume while competition watchdog issues a third puny €5m fine

    Apple's idea of complying with the law in the Netherlands offers a glimpse of what developers elsewhere have to look forward to if regulators elsewhere succeed in challenging the company's control of its iOS App Store.

    Apple is currently trying to fend off lawsuits and proposed legislation around the globe that threaten its stewardship of its iOS App Store. Third-party developers and lawmakers argue that the iGiant's oversight, through contractually enforced rules, is anticompetitive. They aim to have some, if not all, of the company's requirements, like using only using Apple's own in-app payment system, relaxed.

    Beyond payment processor flexibility, many third-party developers, particularly those trying to compete with Apple, want iOS device owners to be able to choose to sideload apps – perhaps with the assistance of a third-party store but without Apple's permission and rent-seeking.

    Continue reading
  • Into x86 servers? Apple seeks 'upbeat and hard-working' hardware engineer

    Strictly Intel and AMD for these hyperscale systems

    Apple has tipped its hand by posting a job advert that reveals some details of the "next-generation" storage and server equipment it is building in its data centers.

    The corporation has posted a cheery recruitment ad seeking to hire an "upbeat and hard-working hardware validation engineer to develop, implement, and complete hardware validation plans for Apple’s next generation Hyperscale and Storage Server platforms!"

    The post points to the server hardware being powered by x86 processors, the very architecture Apple shunned for its PCs, which are moving to an in-house Arm-compatible architecture.

    Continue reading
  • Face Off: IRS kills plan to verify taxpayers with facial recognition database

    Uncle Sam takes security, privacy concerns seriously, it says here

    The Internal Revenue Service has abandoned its plan to verify the identities of US taxpayers using a private contractor's facial recognition technology after both Democrats and Republicans actively opposed the deal.

    US Senator Ron Wyden (D-OR) on Monday said Treasury Department officials informed his office that the agency has decided to move away from using the private facial recognition service ID.me to verify IRS.gov accounts.

    "The Treasury Department has made the smart decision to direct the IRS to transition away from using the controversial ID.me verification service, as I requested earlier today," Wyden said in a statement. "I understand the transition process may take time, but I appreciate that the administration recognizes that privacy and security are not mutually exclusive and no one should be forced to submit to facial recognition to access critical government services."

    Continue reading
  • Intel joins RISC-V governing body, pledges $1bn funding to chip designers

    Now that's a shot in the Arm

    Intel is establishing a $1bn fund to support early-stage and established chip companies to develop innovative chip and packaging technologies.

    The semiconductor giant is also opening its doors to companies who also need help with design and validation of advanced chips on all major architectures, including x86, Arm, and RISC-V. A goal of the fund is to advance the concept of 3D chiplet design for tighter integration of different types of processor cores.

    For example, some chip designs are combining beefy Arm CPU cores with RISC-V management CPU cores, or want to include multiple dies made using different process nodes in a single package. Intel's factories are advancing into nodes that will support tight packaging of those chips.

    Continue reading
  • Chip supply problems might mean Wi-Fi 6E is skipped over for Wi-Fi 7, says analyst

    Lack of endpoints mean firms are ordering 6 or 7, but not 6E

    Supply chain woes with Wi-Fi 6E products could see organisations miss on deploying network kit with the new standard and instead wait on availability of Wi-Fi 7 equipment expected next year, says Dell'Oro Group.

    Wi-Fi 6E builds on Wi-Fi 6, itself only a newish standard, by adding support for frequencies in the 6GHz portion of the spectrum. One advantage of this is that compatible devices can be steered to these frequencies, keeping the existing 2.4GHz and 5GHz bands free for other devices and reducing network contention. Cisco is one firm that has just introduced Wi-Fi 6E access points with this capability.

    But according to Dell'Oro, although manufacturers might have launched Wi-Fi 6E devices, such products are often either not available, or they are in very limited supply. There is a general shortage of semiconductor components, not just Wi-Fi semiconductors, owing to the pandemic impacting production in the countries where the chips are manufactured, and this has led device vendors to focus resources on shipping the most popular models.

    Continue reading
  • Play Store class action has £15m budget for defeating Google in London court

    Detail emerges on who's funding it ... and for how much

    Google has partly won a legal bid to uncover the budget behind a not-quite-class-action lawsuit pursuing it for £920m in Britain's Competition Appeal Tribunal.

    Revealing that Elizabeth Coll's lawyers have £15.4m with which to take on the world's biggest adtech firm, judges dismissed Google's attempt to reveal how much the class-action group would have to pay those lawyers if they win.

    The decision sheds a little more light on the world of for-profit litigation in London against mostly US-based Big Tech firms.

    Continue reading

Biting the hand that feeds IT © 1998–2022