Date: | November 1, 2018 / year-entry #246 |
Tags: | code |
Orig Link: | https://blogs.msdn.microsoft.com/oldnewthing/20181101-00/?p=100105 |
Comments: | 0 |
Summary: | Because there's still a character set dependency. |
There are a number of functions, mostly in the window manager, which have both ANSI and Unicode variants, even though the prototypes are identical. LRESULT WINAPI DispatchMessageW(const MSG*); LRESULT WINAPI DispatchMessageA(const MSG*); BOOL WINAPI TranslateMessageW(const MSG*); BOOL WINAPI TranslateMessageA(const MSG*); int WINAPI TranslateAcceleratorW(HWND, HACCEL, LPMSG); int WINAPI TranslateAcceleratorA(HWND, HACCEL, LPMSG); HACCEL WINAPI CreateAcceleratorTableW(LPACCEL, int); HACCEL WINAPI CreateAcceleratorTableA(LPACCEL, int);
Why can't these pairs of functions be combined into a single
function?
Clearly there's no While it's true that there is no type mismatch, there is still a character set dependency.
For the
The case of typedef struct tagACCEL { BYTE fVirt; WORD key; WORD cmd; } ACCEL, *LPACCEL;
If the |