Received: (qmail 2679 invoked by uid 2012); 8 Jan 1998 23:48:26 -0000 Message-Id: <19980108234826.2678.qmail@hyperreal.org> Date: 8 Jan 1998 23:48:26 -0000 From: Malte Starostik Reply-To: malte.starostik@berlin.snafu.de To: apbugs@hyperreal.org Subject: making the server console hideable X-Send-Pr-Version: 3.2 >Number: 1643 >Category: os-windows >Synopsis: making the server console hideable >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: apache >Arrival-Date: Thu Jan 8 15:50:00 PST 1998 >Closed-Date: Wed Jun 14 23:01:01 PDT 2000 >Last-Modified: Wed Jun 14 23:01:01 PDT 2000 >Originator: malte.starostik@berlin.snafu.de >Release: 1.3b3 >Organization: >Environment: Win95, OSR2, D/Led binary release >Description: I would strongly recommend to make apache's console window hideable, because when permanently running the server while working with the system (for use on a small intranet with no designated server), the omnipresent console (at least minimized in the task bar) isn't very neat. >How-To-Repeat: just start the server under Win95 >Fix: I would suggest to build the executables (resp. write the sources) to run in GUI mode instead and make the server window accesible e.g. through the task bar notification area. Than >Release-Note: >Audit-Trail: Release-Changed-From-To: 1.3.b3-1.3b3 Release-Changed-By: Lars.Eilebrecht@unix-ag.org Release-Changed-When: Sat Jan 10 05:19:12 PST 1998 State-Changed-From-To: open-feedback State-Changed-By: pcs State-Changed-When: Sun Jan 11 07:24:07 PST 1998 State-Changed-Why: Thanks for the suggestion. However Apache is primarily designed to work on NT, where it runs as a service. As such it has no message loop and no access to the GUI. If you know of a way to make the console window on 95 hide itself without having to turn Apache into a GUI application we'd be interested to here about it. From: "Malte Starostik" To: Cc: 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-- State-Changed-From-To: feedback-suspended State-Changed-By: brian State-Changed-When: Wed May 20 19:45:29 PDT 1998 State-Changed-Why: (This is the proper state for this report) State-Changed-From-To: suspended-closed State-Changed-By: wrowe State-Changed-When: Wed Jun 14 23:01:01 PDT 2000 State-Changed-Why: Apache under Windows 95 and 98 will run as a named service in the forthcoming release 1.3.13. Thank you for your feedback and interest in the Apache project! >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ]