summaryrefslogtreecommitdiffstats
path: root/PC/WinMain.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-12-10 05:50:18 (GMT)
committerGuido van Rossum <guido@python.org>1997-12-10 05:50:18 (GMT)
commitd666eae55a13e464ced79d2a0563700183563019 (patch)
treeb592d5b90028208d709cdf80a5073fa5ace0e0f2 /PC/WinMain.c
parent736fe5e918aa097a0c5dd563d906bea80b2701b8 (diff)
downloadcpython-d666eae55a13e464ced79d2a0563700183563019.zip
cpython-d666eae55a13e464ced79d2a0563700183563019.tar.gz
cpython-d666eae55a13e464ced79d2a0563700183563019.tar.bz2
Adding a new project: pythonw, or WinMain.c, containing a main program
that doesn't have a console window attached. stdout/stderr are lost. This is handy though for things like grail.
Diffstat (limited to 'PC/WinMain.c')
-rw-r--r--PC/WinMain.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/PC/WinMain.c b/PC/WinMain.c
new file mode 100644
index 0000000..d833aa7
--- /dev/null
+++ b/PC/WinMain.c
@@ -0,0 +1,15 @@
+/* Minimal main program -- everything is loaded from the library */
+
+#include <windows.h>
+
+extern int Py_Main();
+
+int WINAPI WinMain(
+ HINSTANCE hInstance, // handle to current instance
+ HINSTANCE hPrevInstance, // handle to previous instance
+ LPSTR lpCmdLine, // pointer to command line
+ int nCmdShow // show state of window
+)
+{
+ return Py_Main(__argc, __argv);
+}