How can i implement listener in non-console C++ application to listen for standard input from Adobe AIR?
in C# console app it look like:
namespace HelloNativeProcess
{
class Program
{
static void Main(string[] args)
{
using (Stream stdin = Console.OpenStandardInput())
using (Stream stdout = Console.OpenStandardOutput())
{
byte[] buffer = new byte[2048];
int bytes;
while ((bytes = stdin.Read(buffer, 0, buffer.Length)) > 0)
{
stdout.Write(buffer, 0, bytes);
}
}
}
}
}
I need an example in C++ with APIENTRY winMain() - starting function. Thanks.