26

I don't work with the Windows API much, but I've seen it used there as well as occasionally in a codebase here at work.

4 Answers 4

39

Yup, they wanted to improve (Extend) the API and keep a similar name so it was likely that the programmer would move to the new version.

Notable is GetVersionEx() to get the Windows version, pretty painful for a while with a nasty chicken-and-egg problem.

The record keeper is the National Language Support team who have several ExEx versions, like EnumCalendarInfoExEx. Unsurprising, culture moves even faster than software. No ExExEx as of yet.

1
  • 8
    Most Ex functions are supposed to take arguments via a struct whose first member is the size of the struct. The size acts as a version number and is supposed to allow the function to be extended further if necessary without the need for additional Ex suffixes.
    – jamesdlin
    Aug 31, 2019 at 5:16
10

It's usually done as a way of changing the parameters to a function in an API without breaking existing client code. Old code can continue to use the previous version, while new code can take advantage of the new features offered by the Ex version.

6

It's a naming convention that simply indicates the function is an extended version of an original.

1
  • 2
    Yes, this is to provide backwards compatibility - Windows hardly ever obsoletes an API function. Oct 18, 2010 at 21:08
0

Not sure but I guess it stands for extended.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.