source: golgotha/src/golg/win95/debug.cc @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 11 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.8 KB
Line 
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
13class debug_start
14{
15public:
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;
Note: See TracBrowser for help on using the repository browser.