I don't think that the behavior you want is possible under Windows platform...
I don't think that the behavior you want is possible under Windows platform...
I want to print it in the console because an external software will made some checks about the version. So the real user will run the app just from the icon (without parameters, ) but the other checking software will run it with the versiona argument, in order to get the version and make some checks.
Nice but not possible on Windows. Though you can always try with IPC, if you have the sources of the other software.![]()
locke (19th August 2010)
Isn't it possible to set a version number for an exe just like you do for a DLL?
That sounds a bit complicate. Thanks anyways
You can use AllocConsole(). If your app already has a console it'll fail, otherwise it'll open a new console and set the appropriate handles for you (by default, GUI applications do not have a console)
You can then use GetStdHandle(STD_OUTPUT_HANDLE) to get a handle to your console to which you can write to using WriteFile() or WriteConsole().
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
http://msdn.microsoft.com/en-us/libr...=VS.85%29.aspx
locke (19th August 2010)
Bookmarks