lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


You should probably take a look at http://www.codeproject.com/KB/threads/redir.aspx.

-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Wesley Smith
Sent: Sunday, April 20, 2008 9:05 PM
To: Lua list
Subject: print() and windows stdout redirection

Hi list,
I'm making a windows app with a console that I want to redirect the
lua print() function to.  I have the redirection working with fputs
and printf etc, but for whatever reason, when print is called from
within lua, I don't see it.  The dll/lib I'm using is compiled in
vs2008 so it links against windows libs.  My app is a windows app, not
a console app and I use AllocConsole() to get one and follow this
code: http://dslweb.nwnexus.com/~ast/dload/guicon.htm to redirect the
std* files.

Any ideas as to what could be going on?

thanks,
wes

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential or proprietary to K&L Microwave, Inc. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, immediately contact the sender by reply e-mail and destroy all copies of the original message.