Reputation: 40972
what is the diffrence between these six functions?
LoadLibrary
LoadLibraryA
LoadLibraryEx
LoadLibraryExA
LoadLibraryExW
LoadLibraryW
what is the meaning of each suffix in the winapi and what is the difference between all of those functions?
Upvotes: 3
Views: 381
Reputation: 4356
LoadLibrary
and LoadLibraryEx
are macros which are defined depending on whether your project is compiled with unicode support. If so, they point to LoadLibraryW
and LoadLibraryExW
, otherwise they point to LoadLibraryA
and LoadLibraryExA
.
Typically, you are expected to write code using versions without A or W in the end and let compiler definitions make all the magic for you.
The Ex
suffix is a standard way of denoting an "EXtended" function: one that is similar to the regular version, but provides additional functionality. Generally, they were added in a newer version of Windows and may not always be available (although most of them are so old now that they were added back in Windows 3.1 or 95).
The exact difference between functions, as mentioned before, should always be checked on MSDN.
Upvotes: 6
Reputation: 322
A - ansi W - unicode Ex - extended version of same function, for example some additional parameters
Upvotes: 1
Reputation: 887195
A
means ANSI; W
means Wide (Unicode).
The A
versions do not support Unicode strings; they're relics from Win9X.
The suffix-less version will expand to the A
or W
versions at compile-time, depending on whether the symbol UNICODE
is defined.
The Ex
versions are newer versions of the API method with additional functionality; consult the documentation for more details.
Upvotes: 4