November 08, 2004

Nicer launching of Gtk# Applications in Win32

I have completed my first pass at monoLaunch.exe. This little utility is a Win32 SDK C/C++ application that can be used to launch Gtk# applications using the Mono runtime without opening the sometimes referred to as "unsightly" console window (the window for stdout, stderr and stdin).

This app is somewhat clever in the sense that it goes to the registry and based on the contents of \\SOFTWARE\Novell\mono\DefaultCLR key it gets the location of mono.bat to use it as the executable in the CreateProcess call. What this in turn means is that you can put monoLaunch .exe in the system directory and as the mono installers evolve it will likely always launch your Gtk# executable using the latest mono runtime without you having to jack with path statements and the like.

I will be putting together a quick tutorial that shows how to create a short-cut to an application in the Start Menu using monoLaunch. Shortly thereafter, I will make an installer available for monoLaunch at:

http://forge.novell.com/modules/xfmod/project/?monowin32

In the mean time you can start looking at some source code if you care to.

WARNING: Monoers may convulse when looking at Win32 C/C++ that uses Hungarian notation, _T() macros and little comments.

Posted by martinf at November 8, 2004 07:10 AM
Comments

Oh, so that's what that butt-ugly Win32 code does!

Great! That's one complaint about Mono I got from the Softek .Net posse. (Which is what I should have guessed you were referring to the other night.)

But you have to admit, I hit the nail 50-50. Besides not opening a console window, the butt-ugly Win32 code also starts an executable without waiting around for it. :-)

Posted by: PJ Cabrera at November 8, 2004 08:55 AM

Thank you. ;)

Posted by: Some Guy. at November 8, 2004 01:20 PM

Yes, PJ, that is what it does. You did good.

:)

Posted by: Paco at November 8, 2004 03:26 PM

Thanks, always in the way of simplify things.

Gracias, siempre haciendo las cosas mas simples.

Posted by: David at November 15, 2004 04:23 AM