I have a ATL exe module, which I want to print some output to the console. This module is called by another C# console application, so it should already has a console.
In ATL:
extern "C" int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR , int nShowCmd)
{
printf("test"); // <- this did nothing
MessageBox(nullptr, L"test", L"caption", MB_OK); // <- this work
//...
}