Why did Windows NT decline to support an undocumented flag to TrackPopupMenuEx?

Commenter kero points out that Windows 95 supported a flag called TPM_SYS­MENU, but Windows NT doesn't. Why not?

The TPM_SYS­MENU was never documented. It was used internally by Windows 95 for something-or-other, but Windows NT didn't need to support it, so it didn't. Since it was an internal flag that was never documented, the Windows NT team were under no obligation to support it, and they chose not to. After all, why go to the extra work of writing code to support a flag that nobody can legitimately be using?

Unsupported flag is unsupported.

Comments (17)
  1. PastorGL says:

    Raymond, excuse me for off-topic comment, but it seems like RSS feeds of this blog stopped to work. Is this intentional?

    1. Ace says:

      I switched to https://blogs.msdn.microsoft.com/oldnewthing/feed for this blog’s RSS feed. Hope I don’t have to change back.

      1. GregM says:

        My reader had already switched to that URL automatically.

      2. PastorGL says:

        Oh, this address work. Thank you!

    2. Buster says:

      Oh, so it’s not just me. Other MSDN blogs’ feeds seem to be working, but not this one. :(

    3. Arezz says:

      Indeed, the RSS feed stopped working. I was already wondering about the lack of new articles in my feed reader!

      1. Neil says:

        Certainly my reader glitched a few times last month but it seems to be back to normal now. Then again, it’s still configured for blogs.msdn.com/oldnewthing/atom.xml …

  2. sense says:

    A strange response from Raymond, indeed.
    But more strangely for me, how come an undocumented enum even has a “name”??

    1. mmediouni says:

      Undocumented means that you may have headers and such for it, but Microsoft doesn’t support its use.
      (there is already several third-party POSIX NT subsystems out there for example, but they can break with near-certainity on each release, as they have to exclusively use undocumented APIs, even if you have most of the functions defined in WDK headers)

    2. Ted says:

      Internal code still needs to have a way of referencing the thing. If it didn’t have any name, then it still would have had a numeric value and people would have tried to figure out why that stopped working in Windows NT.

    3. Antonio Rodríguez says:

      My bet is that they didn’t remember to remove it from the header files, or they just didn’t bother. If you let an undocumented item (parameter value, function prototype) in a published header file (let’s say, in a beta version of the SDK), it’s a bad idea to remove it later, because it can break working code. Raymond has alerady written about other cases.

      As I understand it, “undocumented” means that the item is neither described in the official documentation, nor supported. It would be expected that undocumented items were defined in Microsoft’s internal header files and they didn’t make to the public ones, but from time to time something escapes this rule.

      1. Alex Cohn says:

        Also don’t rule out code leaks.

        1. RKZENITH says:

          So here’s my question. I find many situations where .NET has 2-3 constants enumerated, MSDN has 8-9 described, and the SDK has 24-25 declared. Does that mean 2/3 of the SDK is off limits to my adventuring through interop land?

          1. Erik F says:

            No, it’s more likely that .NET only describes the constants that are required for its provided classes to work properly; truthfully, .NET wouldn’t need any exposed Win32 constants if the designers wanted to go that direction. If you want to talk to Win32 on your own, you also have to describe the constants that you need.

          2. voo says:

            It’s simple, independent of you using.net or win32. Check the API documentation to see what is available. In your case that means stick to the 8-9 enums if you’re writing your own wrapper.

            If you use the existing one that only documents 2-3 you should usually stick to that, but in that’s case if it’s a thin wrapper you’re probably fine.

  3. 640k says:

    Probably an OS backdoor used by some MS app to gain a competitive advantage. As usual.

    1. Jack says:

      Oh, cut it out.

Comments are closed.

Skip to main content