Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does it mean when `Ex` is added to a function/method name?

Tags:

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.

like image 759
J Cooper Avatar asked Oct 18 '10 21:10

J Cooper


People also ask

What does ex suffix mean in function names in the Windows API?

When Microsoft updates a function and the new function is incompatible with the old one, Microsoft continues to support the old function. The new function keeps the same name as the old function, with added -Ex suffix. Follow this answer to receive notifications.


1 Answers

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.

like image 100
Hans Passant Avatar answered Sep 20 '22 18:09

Hans Passant