If you have code like this :-
It won’t compile when
UNICODE is defined.
This is so because there are no separate GetProcAddressW/GetProcAddressA functions. The second argument to
GetProcAddress is an
const char*), because exported names in Win32 modules are stored as ANSI strings. The right way to write the above line would be :-
I can’t remember right now if there are other commonly used API functions that depict similar behavior.