I have a DLL where I use AllocConsole() and cout to display data for debugging purposes. It used to work fine but since I updated my compiler (Visual Studio 2012) to the
I vaguely recall that you might need to redirect the stdout to the console. I might be wrong though (since you had your code working earlier):
AllocConsole(); freopen("CONOUT$", "w", stdout); std::cout << "This works" << std::endl;