On Fri, May 07, 2010 at 12:55:51AM +0700, Antoine Martin wrote:
> Well, I just tried it and this is not going to help if nothing gets
> printed on the DOS window...
> I tested by adding:
>   fprintf(stderr, "run()\n");
> 
> $ wine ./winvnc4.exe
> fixme:advapi:RegisterEventSourceA ((null),"WinVNC4"): stub
> fixme:advapi:RegisterEventSourceW (L"",L"WinVNC4"): stub
> TigerVNC Server - TigerVNC Server for Win32, Version 1.0.90
> Built on May  7 2010 at 00:42:40
> Copyright (C) 1998-2009 [many holders]
> 
> Starting User-Mode VNC Server.
> run()
> [...]
> 
> But under win32 nothing comes out at all...
> Any ideas?

Sorry for late response, I was quite busy.

I dig about this issue a little and I've found that, by default,
Windows GUI applications write nothing to console. It seems that all
*printf calls are redirected to "/dev/null". I just tried to add
following to start of the winvnc.cxx:main() function and everything
worked fine:

AllocConsole();
freopen("conin$","r",stdin);
freopen("conout$","w",stdout);
freopen("conout$","w",stderr);

You can use it as a temporary workaround before we do something with
it because debugging of Windows binaries is painfull now.

Regards, Adam

-- 
Adam Tkac, Red Hat, Inc.

------------------------------------------------------------------------------

_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to