It gets worse with that old code if you try to share modules between windows and Linux applications.
Additional complications come from trying to support TCHAR to allow either type of char for libraries.
Anyway, I have ended up supporting monstrosities of wstring, string, CString, char *, TCHAR mushed together, constantly marshalled converted back and forth.
And more: https://docs.microsoft.com/en-us/cpp/text/how-to-convert-bet...