Commit 5dcfd1d3 authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  Thanks again, Andrew Braund... a little testing and sleuthing revealed
  we were trying to load kernel32.dll as we unloaded, which is badness.

  Right there, in my face, was the 'won't stay alive on logout' bug.
  Squashed.  So Win95/98 are working as they were in 1.3.14, only better!

  Happy day, time to roll once the remaining showstopper is cleaned up.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87348 13f79535-47bb-0310-9956-ffa450edef68
parent ea8867b7
Loading
Loading
Loading
Loading
+27 −20
Original line number Diff line number Diff line
@@ -496,8 +496,8 @@ static LRESULT CALLBACK ttyConsoleCtrlWndProc(HWND hwnd, UINT msg,
 */
static LRESULT WINAPI RegisterWindows9xService(BOOL set_service)
{
    HINSTANCE hkernel;
    DWORD (WINAPI *register_service_process)(DWORD, DWORD);
    static HINSTANCE hkernel;
    static DWORD (WINAPI *register_service_process)(DWORD, DWORD) = NULL;
    BOOL rv;

    if (set_service == is_service)
@@ -509,6 +509,8 @@ static LRESULT WINAPI RegisterWindows9xService(BOOL set_service)
              GetCurrentProcessId());
#endif

    if (!register_service_process)
    {
        /* Obtain a handle to the kernel library */
        hkernel = LoadLibrary("KERNEL32.DLL");
        if (!hkernel)
@@ -521,16 +523,21 @@ static LRESULT WINAPI RegisterWindows9xService(BOOL set_service)
            FreeLibrary(hkernel);
            return 0;
        }
    }
    
    /* Register this process as a service */
    rv = register_service_process(0, is_service != FALSE);
    rv = register_service_process(0, set_service != FALSE);
    if (rv)
        is_service = set_service;
    
    if (!is_service)
    {
        /* Unload the kernel library */
        FreeLibrary(hkernel);
        register_service_process = NULL;
        return rv;
    }
}


/*