1 | /********************************************************************** <BR>
|
---|
2 | This file is part of Crack dot Com's free source code release of
|
---|
3 | Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
|
---|
4 | information about compiling & licensing issues visit this URL</a>
|
---|
5 | <PRE> If that doesn't help, contact Jonathan Clark at
|
---|
6 | golgotha_source@usa.net (Subject should have "GOLG" in it)
|
---|
7 | ***********************************************************************/
|
---|
8 |
|
---|
9 | #include <windows.h>
|
---|
10 | #include <process.h>
|
---|
11 | #include <stdio.h>
|
---|
12 |
|
---|
13 | class debug_start
|
---|
14 | {
|
---|
15 | public:
|
---|
16 | debug_start()
|
---|
17 | {
|
---|
18 | PROCESS_INFORMATION piProcInfo;
|
---|
19 | STARTUPINFO siStartInfo;
|
---|
20 |
|
---|
21 | /* Set up members of STARTUPINFO structure. */
|
---|
22 |
|
---|
23 | siStartInfo.cb = sizeof(STARTUPINFO);
|
---|
24 | siStartInfo.lpReserved = NULL;
|
---|
25 | siStartInfo.lpReserved2 = NULL;
|
---|
26 | siStartInfo.cbReserved2 = 0;
|
---|
27 | siStartInfo.lpDesktop = NULL;
|
---|
28 | siStartInfo.dwFlags = 0;
|
---|
29 |
|
---|
30 | /* Create the child process. */
|
---|
31 |
|
---|
32 | char cmd[200];
|
---|
33 | sprintf(cmd,"f:\\jc\\code\\w95_db\\dbug\\debug\\dbug.exe %d", _getpid());
|
---|
34 | CreateProcess(NULL,
|
---|
35 | cmd,
|
---|
36 | NULL, /* process security attributes */
|
---|
37 | NULL, /* primary thread security attributes */
|
---|
38 | TRUE, /* handles are inherited */
|
---|
39 | 0, /* creation flags */
|
---|
40 | NULL, /* use parent's environment */
|
---|
41 | NULL, /* use parent's current directory */
|
---|
42 | &siStartInfo, /* STARTUPINFO pointer */
|
---|
43 | &piProcInfo); /* receives PROCESS_INFORMATION */
|
---|
44 | Sleep(5000);
|
---|
45 | }
|
---|
46 | } debug_start_instance;
|
---|