EnumClaw, the function that never was


bhiggins asks about the mysterious function EnumClaw that existed in some versions of the Win32 documentation.

I went digging through the MSDN archives and was close to giving up and declaring the cause lost, but then I found it: A copy of the EnumClaw documentation.

EnumClaw

The EnumClaw function returns the child or the parent of the window whose HWND is passed in.

HWND EnumClaw(
  HWND hwndParent    // handle to parent window
);
Parameters
hwndParent
[in] Handle to the parent window.
Return Values

If the function succeeds, the return value is the HWND of the child of the hwndParent window. If the window has no child, the return value is the HWND of the parent of the hwndParent window.

If the function fails, the return value is NULL. To get extended error information, call GetLastError.

Requirements

  Windows NT/2000/XP: Included in Windows XP and Windows .NET Server.
  Windows 95/98/Me: Unsupported.
  Header: Declared in Winuser.h; include Windows.h.
  Library: Use User32.lib.

See Also

Windows Overview, Window Functions.

There was never a function called EnumClaw. This was a joke inserted by the documentation folks, a pun on the Washington city named Enumclaw. (The state of Washington has a lot of place names which come from Native American words. Other examples are Sequim, Puyallup, and Tulalip. At least Enumclaw is pronounced almost like it’s spelled.)

Comments (24)
  1. Someone You Know says:

    Vaguely reminiscent of two functions listed in the BeOS kernel documentation:

    is_computer_on(), which returns 1 if the computer is on (if the computer is off, the return value is undefined)

    and

    is_computer_on_fire(), which returns the temperature of the motherboard if the computer is on fire.

    That’s not a joke; the functions are actually listed in the documentation, though I don’t know if they actually exist.

  2. The BeOS functions existed and were implemented; they were actually used for benchmarking system call times. is_computer_on() gives you the time taken to enter the kernel and return an integer; is_computer_on_fire() gives you the time taken to enter the kernel and return a floating point number.

  3. Someone You Know says:

    @Simon Farnsworth

    I guess that’s why the documentation for is_computer_on_fire() says that it returns "some other value" if the computer isn’t on fire.

    Still, bad programming practice to rely on a function for something other than its intended purpose…

  4. Dave says:

    Saw this driving through Washington with my family years ago: Humptulips

    http://en.wikipedia.org/wiki/Humptulips,_Washington

    Not sure if it’s an Native American name or not, Wikipedia has a few possibilities for the origin of the name

  5. Mike Kelly says:

    Also heard that there was a data structure consisting of master page records that tracked, I believe, memory management and the main master page was called the BurgerMaster after the fast-food place outside the original MS building in Bellevue on Northrup.

  6. keithmo says:

    The EnumClaw() API should terminate a random thread (preferably in another process) when called.

    (The Native American word "enumclaw" allegedly means "place of evil spirits".)

  7. Aaargh! says:

    The Android API’s have various constants as part of the SensorManager class, including:

    GRAVITY_EARTH (seems reasonable)

    GRAVITY_MOON

    GRAVITY_JUPITER (all the other planets are there too)

    GRAVITY_SUN

    GRAVITY_DEATH_STAR_I

    GRAVITY_THE_ISLAND

    It also has a constant for sensor type SENSOR_TRICORDER

  8. drh says:

    Is there a WitheredClaw() ?

  9. EvilSpudBoy says:

    Wow. Great joke.  I want to party with the these guys.

  10. Phil W says:

    Very apropos comment by Raymond, considering the date, and assuming it’s not an April Fool’s post anyway!  

  11. ahamilton says:

    Alas the only thing I can think of when someone mentions EnumClaw is this:

    http://en.wikipedia.org/wiki/Zoo_(film)

  12. bhiggins says:

    Awesome, thanks for digging that up Raymond!

    I’m glad to know that I wasn’t hallucinating the whole thing.

  13. They should have made EnumClaw() take a callback function pointer (and a thunk) so that it actually enumerated something.

  14. Steve says:

    @Mike Kelly: Take a look at some of the documentatio for Sun network interfaces.

    Some of them show up as hme0, for example.  HME?  Happy Meal Ethernet.

  15. Hans says:

    This is a very nice function:

    "The EnumClaw function returns the child or the parent of the window whose HWND is passed in."

    As stated, it will return either the child or parent of the window, and I think the mood of the moon will decide…

  16. MSDNArchive says:

    While doing hardcore Win32 and then COM interface work in the 90’s, when I would be driving to and from Microsoft on I-405 and invaribly a reference to Enumclaw the town.

    My associative memory would trigger images of all the various EnumXXX functions and methods.

    Glad others made the same association.

  17. Hardware Junkie says:

    There’s probably a joke lurking about that involves inappropriate relations with animals, another thing the real Enumclaw is famous for. This api probably predates that infamy.

  18. Médinoc says:

    What makes the joke in EnumClaw obvious is that a window can have several children.

  19. Worf says:

    There was a more useful BeOS function that let you disable a processor so you could simulate a single proc machine or so.

    Of course, it also let you simulate a *0* processor machine, too. Not sure if it did it by the normal implementation (i.e., disable the last processor) or if the kernel simply special cased it.

    And yes, it crashes. After all, it’s hard to execute code with no processor…

  20. SD says:

    My favorite line from OS documentation is still from AmigaOS for the ColdReboot() function.

    "This function never returns."

  21. Sam says:

    Another funny one in the Win32 API is PathYetAnotherMakeUniqueName:

    http://msdn.microsoft.com/en-us/library/bb776479(VS.85).aspx

  22. MarcT says:

    For the non-locals:

    Puyallup: Pew-ALL-up

    Sequim: Skwim

    Tulalip: Too-LAY-lip

    And as a bonus, Mt Rainier: Ren-YAY (that one’s French)

    [As a side note: The British pronunciation is “RAY-nee-er” (as in “with more rain”). -Raymond]
  23. BBA says:

    Standard C has strcat, strcmp, strcpy and strlen.  On Linux the GNU C Library adds strfry.

  24. Cheong says:

    @Médinoc: But when I first read that on the documentation, my brain automatically translate it to be a function to test whether the supposed "parent handle" is indeed the window of your window, or whether it’s not exist anymore…

    I certainly didn’t expect a function in documentation to be useless…

    Btw, it’s a strange name so I should have a clue indeed…

Comments are closed.