65

In windows APIs and various other libraries where I have seen multiple entry points to methods I have noticed the use of the Ex abbreviation in scenarios such as MyApiCall and MyApiCallEx.

My assumption is that this stands for Extension or Extra could someone please confirm?

Any history on why Ex was chosen rather then MyApiCall2 or similar would also be appreciated.

ssube
  • 47,010
  • 7
  • 103
  • 140
Maxim Gershkovich
  • 45,951
  • 44
  • 147
  • 243
  • 83
    It stands for "'Ex'cuse us, but we didn't make this thing correctly the first time, but we can't just add on to this function because it would break the existing interface, so have this new function!" Or, it could be peachykeen's answer, too. `` hehe – Andrew Barber Oct 28 '10 at 01:46
  • 1
    @Andrew: I'd say your're probably right. We're just lucky they haven't unleashed the Ex2 API on us yet. :p – ssube Oct 28 '10 at 01:54
  • possible duplicate of [What does it mean when `Ex` is added to a function/method name?](http://stackoverflow.com/questions/3963374/what-does-it-mean-when-ex-is-added-to-a-function-method-name) – Benoit Apr 12 '11 at 15:49
  • note that the suffix 2 is also used: `IsWow64Process` and `IsWow64Process2` – phuclv Dec 21 '19 at 12:52
  • Well, in Windows 7, when MS decided that [IVdsVolumeMF2::FormatEx](https://learn.microsoft.com/en-us/windows/win32/api/vds/nf-vds-ivdsvolumemf2-formatex) wasn't enough, we got [IVdsVolumeMF3::FormatEx2](https://learn.microsoft.com/en-us/windows/win32/api/vds/nf-vds-ivdsvolumemf3-formatex2)... – kFYatek Jun 22 '21 at 08:39

1 Answers1

60

I was under the impression it stood for extended, as in a more detailed interface for that particular library.

For example, CreateFile with 4 parameters is the typical version and CreateFileEx with 17 is the version offering more control and finer detail over how the file is opened, what occurs if it doesn't exist, etc, and is thus extended.

ssube
  • 47,010
  • 7
  • 103
  • 140