mpm_winnt.h revision 5a58a10705b7b154b53294e0c0283d64eabdcb7f
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb/* ====================================================================
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * The Apache Software License, Version 1.1
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * Copyright (c) 2000 The Apache Software Foundation. All rights
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * reserved.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * Redistribution and use in source and binary forms, with or without
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * modification, are permitted provided that the following conditions
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * are met:
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * 1. Redistributions of source code must retain the above copyright
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * notice, this list of conditions and the following disclaimer.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * 2. Redistributions in binary form must reproduce the above copyright
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * notice, this list of conditions and the following disclaimer in
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * the documentation and/or other materials provided with the
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * distribution.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * 3. The end-user documentation included with the redistribution,
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * if any, must include the following acknowledgment:
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * "This product includes software developed by the
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * Apache Software Foundation (http://www.apache.org/)."
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * Alternately, this acknowledgment may appear in the software itself,
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * if and wherever such third-party acknowledgments normally appear.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * 4. The names "Apache" and "Apache Software Foundation" must
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * not be used to endorse or promote products derived from this
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * software without prior written permission. For written
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * permission, please contact apache@apache.org.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * 5. Products derived from this software may not be called "Apache",
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * nor may "Apache" appear in their name, without prior written
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * permission of the Apache Software Foundation.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * SUCH DAMAGE.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * ====================================================================
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * This software consists of voluntary contributions made by many
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * individuals on behalf of the Apache Software Foundation. For more
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * information on the Apache Software Foundation, please see
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * Portions of this software are based upon public domain software
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * originally written at the National Center for Supercomputing Applications,
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * University of Illinois, Urbana-Champaign.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbbapr_status_t ap_registry_store_value(const char *key, const char *name,
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb const char *value);
b38846b15c8891c6dec44dcc4f96ca40721bf663rbbapr_status_t ap_registry_get_value(apr_pool_t *p, const char *key,
b38846b15c8891c6dec44dcc4f96ca40721bf663rbbapr_status_t ap_registry_store_array(apr_pool_t *p, const char *key,
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb char const* const* elts);
b38846b15c8891c6dec44dcc4f96ca40721bf663rbbapr_status_t ap_registry_get_array(apr_pool_t *p, const char *key,
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb const char *name,
b38846b15c8891c6dec44dcc4f96ca40721bf663rbbapr_status_t ap_registry_delete_value(const char *key, const char *name);
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb#define SERVICECONFIG9X "Software\\Microsoft\\Windows\\CurrentVersion\\RunServices"
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb#define SERVICECONFIG "System\\CurrentControlSet\\Services\\%s"
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb#define SERVICEPARAMS "System\\CurrentControlSet\\Services\\%s\\Parameters"
b38846b15c8891c6dec44dcc4f96ca40721bf663rbbextern char const* service_name;
b38846b15c8891c6dec44dcc4f96ca40721bf663rbbextern char const* display_name;
b38846b15c8891c6dec44dcc4f96ca40721bf663rbbapr_status_t mpm_service_set_name(apr_pool_t *p, const char *name);
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantzapr_status_t mpm_merge_service_args(apr_pool_t *p, apr_array_header_t *args,
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantzapr_status_t mpm_service_install(apr_pool_t *ptemp, int argc,
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz char const* const* argv);
b38846b15c8891c6dec44dcc4f96ca40721bf663rbbapr_status_t mpm_service_start(apr_pool_t *ptemp, int argc,
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb char const* const* argv);
b38846b15c8891c6dec44dcc4f96ca40721bf663rbbextern void clean_child_exit(int);
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowetypedef struct CompContext {
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe/* This code is stolen from the apr_private.h and misc/win32/misc.c
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe * Please see those sources for detailed documentation.
3e392a5afd51526de3cb15d57ee46d8cb160ae65gregamestypedef enum {
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantzFARPROC ap_load_dll_func(ap_dlltoken_e fnLib, char *fnName, int ordinal);
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe#define AP_DECLARE_LATE_DLL_FUNC(lib, rettype, calltype, fn, ord, args, names) \
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe typedef rettype (calltype *ap_winapi_fpt_##fn) args; \
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe static ap_winapi_fpt_##fn ap_winapi_pfn_##fn = NULL; \
3e392a5afd51526de3cb15d57ee46d8cb160ae65gregames ap_winapi_pfn_##fn = (ap_winapi_fpt_##fn) ap_load_dll_func(lib, #fn, ord); \
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe/* WinNT kernel only */
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wroweAP_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, CancelIo, 0, (
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe/* Win9x kernel only */
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewroweAP_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, DWORD, WINAPI, RegisterServiceProcess, 0, (
fa06de8a28a737e8fbaad76d7f3ff67aaa5e4a09wrowe#define RegisterServiceProcess ap_winapi_RegisterServiceProcess
c2cf53a40a9814eb91db2cdf820f97d943f21628coar#endif /* APACHE_MPM_WINNT_H */