/[cvs]/joko/Uni/BSArch/03/win32/min_shell.c
ViewVC logotype

Annotation of /joko/Uni/BSArch/03/win32/min_shell.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Thu Jun 15 12:41:05 2006 UTC (18 years, 5 months ago) by joko
Branch: MAIN
Changes since 1.1: +31 -2 lines
File MIME type: text/plain
runs notepad

1 joko 1.1 /* $Id: prime.c,v 1.13 2006/05/13 18:53:54 joko Exp $ */
2    
3     #include <stdlib.h>
4     #include <errno.h>
5 joko 1.2 #include <windows.h>
6    
7     #define BOOL int
8     #define TRUE 1
9     #define FALSE 0
10 joko 1.1
11     int main(int argc, char * argv[]) {
12     if (argc == 1) {
13 joko 1.2 //printf("No arguments given.");
14     //exit(EXIT_FAILURE);
15     char filename[255] = "abc\0";
16     BOOL background = 0;
17     start_process(filename, background);
18 joko 1.1 }
19     }
20 joko 1.2
21     BOOL start_process(char *filename[], BOOL background) {
22    
23     STARTUPINFO si;
24     PROCESS_INFORMATION pi;
25    
26     ZeroMemory(&si,sizeof(si));
27     si.cb=sizeof(STARTUPINFO);
28    
29     ZeroMemory(&pi,sizeof(pi));
30     //pi.cb=sizeof(PROCESS_INFORMATION);
31    
32     CreateProcess(
33     NULL, "notepad.exe",
34     NULL, NULL, FALSE, 0,
35     NULL, NULL,
36     &si,
37     &pi
38     );
39    
40     }

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed