www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malte Starostik" <malte.staros...@berlin.snafu.de>
Subject Re: os-windows/1643: making the server console hideable
Date Thu, 15 Jan 1998 00:20:00 GMT
The following reply was made to PR os-windows/1643; it has been noted by GNATS.

From: "Malte Starostik" <malte.starostik@berlin.snafu.de>
To: <pcs@hyperreal.org>
Cc: <apbugs@Apache.Org>
Subject: Re: os-windows/1643: making the server console hideable
Date: Thu, 15 Jan 1998 01:10:19 +0100

 This is a multi-part message in MIME format.
 
 ------=_NextPart_000_0009_01BD2152.58ECF100
 Content-Type: text/plain;
 	charset="iso-8859-1"
 Content-Transfer-Encoding: 7bit
 
 Sorry, I can't imagine how to do that. But I've written a VERY simple
 program that toggles the consoles visibility after apache has been started.
 It's certainly not the very solution, but the only thing I knew how to do.
 Its makefile is generated with VC4++ and I didn't manage to clean unused
 stuff, since I don't know a makefile's syntax :( The makefile and main.c,
 the only object to compile are attached to this mail.
 
 Malte Starostik
 
 ------=_NextPart_000_0009_01BD2152.58ECF100
 Content-Type: application/octet-stream;
 	name="ApacheHide95.mak"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment;
 	filename="ApacheHide95.mak"
 
 # Microsoft Developer Studio Generated NMAKE File, Format Version 4.00
 # ** DO NOT EDIT **
 
 # TARGTYPE "Win32 (x86) Application" 0x0101
 
 !IF "$(CFG)" =3D=3D ""
 CFG=3DApacheHide95 - Win32 Debug
 !MESSAGE No configuration specified.  Defaulting to ApacheHide95 - Win32 =
 Debug.
 !ENDIF=20
 
 !IF "$(CFG)" !=3D "ApacheHide95 - Win32 Release" && "$(CFG)" !=3D\
  "ApacheHide95 - Win32 Debug"
 !MESSAGE Invalid configuration "$(CFG)" specified.
 !MESSAGE You can specify a configuration when running NMAKE on this =
 makefile
 !MESSAGE by defining the macro CFG on the command line.  For example:
 !MESSAGE=20
 !MESSAGE NMAKE /f "ApacheHide95.mak" CFG=3D"ApacheHide95 - Win32 Debug"
 !MESSAGE=20
 !MESSAGE Possible choices for configuration are:
 !MESSAGE=20
 !MESSAGE "ApacheHide95 - Win32 Release" (based on "Win32 (x86) =
 Application")
 !MESSAGE "ApacheHide95 - Win32 Debug" (based on "Win32 (x86) =
 Application")
 !MESSAGE=20
 !ERROR An invalid configuration is specified.
 !ENDIF=20
 
 !IF "$(OS)" =3D=3D "Windows_NT"
 NULL=3D
 !ELSE=20
 NULL=3Dnul
 !ENDIF=20
 #########################################################################=
 #######
 # Begin Project
 CPP=3Dcl.exe
 RSC=3Drc.exe
 MTL=3Dmktyplib.exe
 
 !IF  "$(CFG)" =3D=3D "ApacheHide95 - Win32 Release"
 
 # PROP BASE Use_MFC 0
 # PROP BASE Use_Debug_Libraries 0
 # PROP BASE Output_Dir "ApacheR"
 # PROP BASE Intermediate_Dir "ApacheR"
 # PROP BASE Target_Dir ""
 # PROP Use_MFC 0
 # PROP Use_Debug_Libraries 0
 # PROP Output_Dir "ApacheR"
 # PROP Intermediate_Dir "ApacheR"
 # PROP Target_Dir ""
 OUTDIR=3D.\ApacheR
 INTDIR=3D.\ApacheR
 
 ALL : "$(OUTDIR)\ApacheHide95.exe"
 
 CLEAN :=20
 	-@erase ".\ApacheHi\ApacheHide95.exe"
 	-@erase ".\ApacheHi\main.obj"
 
 "$(OUTDIR)" :
     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" =
 /YX /c
 # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX =
 /c
 CPP_PROJ=3D/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
  /Fp"$(INTDIR)/ApacheHide95.pch" /YX /Fo"$(INTDIR)/" /c=20
 CPP_OBJS=3D.\ApacheR/
 CPP_SBRS=3D
 # ADD BASE MTL /nologo /D "NDEBUG" /win32
 # ADD MTL /nologo /D "NDEBUG" /win32
 MTL_PROJ=3D/nologo /D "NDEBUG" /win32=20
 # ADD BASE RSC /l 0x407 /d "NDEBUG"
 # ADD RSC /l 0x407 /d "NDEBUG"
 BSC32=3Dbscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 BSC32_FLAGS=3D/nologo /o"$(OUTDIR)/ApacheHide95.bsc"=20
 BSC32_SBRS=3D
 LINK32=3Dlink.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib =
 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib =
 odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib =
 advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib =
 odbccp32.lib th32.lib /nologo /subsystem:windows /machine:I386
 LINK32_FLAGS=3Dkernel32.lib user32.lib gdi32.lib winspool.lib =
 comdlg32.lib\
  advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
  odbccp32.lib th32.lib /nologo /subsystem:windows /incremental:no\
  /pdb:"$(OUTDIR)/ApacheHide95.pdb" /machine:I386\
  /out:"$(OUTDIR)/ApacheHide95.exe"=20
 LINK32_OBJS=3D \
 	"$(INTDIR)/main.obj"
 
 "$(OUTDIR)\ApacheHide95.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
     $(LINK32) @<<
   $(LINK32_FLAGS) $(LINK32_OBJS)
 <<
 
 !ELSEIF  "$(CFG)" =3D=3D "ApacheHide95 - Win32 Debug"
 
 # PROP BASE Use_MFC 0
 # PROP BASE Use_Debug_Libraries 1
 # PROP BASE Output_Dir "ApacheR"
 # PROP BASE Intermediate_Dir "ApacheR"
 # PROP BASE Target_Dir ""
 # PROP Use_MFC 0
 # PROP Use_Debug_Libraries 1
 # PROP Output_Dir "ApacheR"
 # PROP Intermediate_Dir "ApacheR"
 # PROP Target_Dir ""
 OUTDIR=3D.\ApacheR
 INTDIR=3D.\ApacheR
 
 ALL : "$(OUTDIR)\ApacheHide95.exe"
 
 CLEAN :=20
 	-@erase ".\ApacheR\ApacheHide95.exe"
 	-@erase ".\ApacheR\main.obj"
 	-@erase ".\ApacheR\ApacheHide95.ilk"
 	-@erase ".\ApachR0\ApacheHide95.pdb"
 	-@erase ".\ApacheR\vc40.pdb"
 	-@erase ".\ApacheR\vc40.idb"
 
 "$(OUTDIR)" :
     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
 
 # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D =
 "_WINDOWS" /YX /c
 # ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D =
 "_WINDOWS" /YX /c
 CPP_PROJ=3D/nologo /MLd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D =
 "_WINDOWS"\
  /Fp"$(INTDIR)/ApacheHide95.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c=20
 CPP_OBJS=3D.\ApacheR/
 CPP_SBRS=3D
 # ADD BASE MTL /nologo /D "_DEBUG" /win32
 # ADD MTL /nologo /D "_DEBUG" /win32
 MTL_PROJ=3D/nologo /D "_DEBUG" /win32=20
 # ADD BASE RSC /l 0x407 /d "_DEBUG"
 # ADD RSC /l 0x407 /d "_DEBUG"
 BSC32=3Dbscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
 BSC32_FLAGS=3D/nologo /o"$(OUTDIR)/ApacheHide95.bsc"=20
 BSC32_SBRS=3D
 LINK32=3Dlink.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib =
 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib =
 odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib =
 advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib =
 odbccp32.lib th32.lib /nologo /subsystem:windows /debug /machine:I386
 LINK32_FLAGS=3Dkernel32.lib user32.lib gdi32.lib winspool.lib =
 comdlg32.lib\
  advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
  odbccp32.lib th32.lib /nologo /subsystem:windows /incremental:yes\
  /pdb:"$(OUTDIR)/ApacheHide95.pdb" /debug /machine:I386\
  /out:"$(OUTDIR)/ApacheHide95.exe"=20
 LINK32_OBJS=3D \
 	"$(INTDIR)/main.obj"
 
 "$(OUTDIR)\ApacheHide95.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
     $(LINK32) @<<
   $(LINK32_FLAGS) $(LINK32_OBJS)
 <<
 
 !ENDIF=20
 
 .c{$(CPP_OBJS)}.obj:
    $(CPP) $(CPP_PROJ) $< =20
 
 .cpp{$(CPP_OBJS)}.obj:
    $(CPP) $(CPP_PROJ) $< =20
 
 .cxx{$(CPP_OBJS)}.obj:
    $(CPP) $(CPP_PROJ) $< =20
 
 .c{$(CPP_SBRS)}.sbr:
    $(CPP) $(CPP_PROJ) $< =20
 
 .cpp{$(CPP_SBRS)}.sbr:
    $(CPP) $(CPP_PROJ) $< =20
 
 .cxx{$(CPP_SBRS)}.sbr:
    $(CPP) $(CPP_PROJ) $< =20
 
 #########################################################################=
 #######
 # Begin Target
 
 # Name "ApacheHide95 - Win32 Release"
 # Name "ApacheHide95 - Win32 Debug"
 
 !IF  "$(CFG)" =3D=3D "ApacheHide95 - Win32 Release"
 
 !ELSEIF  "$(CFG)" =3D=3D "ApacheHide95 - Win32 Debug"
 
 !ENDIF=20
 
 #########################################################################=
 #######
 # Begin Source File
 
 SOURCE=3D.\main.c
 
 "$(INTDIR)\main.obj" : $(SOURCE) "$(INTDIR)"
 
 
 # End Source File
 # End Target
 # End Project
 #########################################################################=
 #######
 
 ------=_NextPart_000_0009_01BD2152.58ECF100
 Content-Type: application/octet-stream;
 	name="main.c"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment;
 	filename="main.c"
 
 #include "windows.h"
 #include "tlhelp32.h"
 
 BOOL CALLBACK EnumProc(HWND hwnd, LPARAM lParam) {
 	DWORD PId;
 	GetWindowThreadProcessId(hwnd, &PId);
 	if (PId =3D=3D lParam) ShowWindow(hwnd, IsWindowVisible(hwnd) ? SW_HIDE =
 : SW_SHOW);
 	return TRUE;
 }=20
 
 
 int WINAPI WinMain(HINSTANCE  hInstance, HINSTANCE  hPrevInstance,
     LPSTR  lpszCmdLine, int  nCmdShow) {
 
 	PROCESSENTRY32 pe;
 	HANDLE hSnap;
 	BOOL bContinue;
 	LPSTR pNoPath;
 	hSnap =3D CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
 	if (!hSnap) return TRUE;
 	bContinue =3D Process32First(hSnap, &pe);
 	while (bContinue) {
 		pNoPath =3D pe.szExeFile+lstrlen(pe.szExeFile);
 		if (lstrlen("Apache.exe") <=3D lstrlen(pe.szExeFile)) pNoPath -=3D =
 lstrlen("Apache.exe");
 		if (lstrcmpi(pNoPath, "Apache.exe") =3D=3D 0) EnumWindows(&EnumProc, =
 pe.th32ProcessID);
 		bContinue =3D Process32Next(hSnap, &pe);
 	}
 	CloseHandle(hSnap);
 
 	return FALSE;
 }
 ------=_NextPart_000_0009_01BD2152.58ECF100--
 

Mime
View raw message