+#ifdef _UNICODE
+// In Unicode build MFC normally requires to manually change the entry point to
+// wWinMainCRTStartup() but to avoid having to modify the project options to do
+// it we provide an adapter for it.
+extern "C" int wWinMainCRTStartup();
+
+int WINAPI WinMain(HINSTANCE, HINSTANCE, char *, int)
+{
+ wWinMainCRTStartup();
+}
+#endif // _UNICODE
+