svcctl.ndl revision 3db3f65c6274eb042354801a308c8e9bc4994553
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* NT Service Control Services (SVCCTL) RPC interface definition.
* This interface provides remote access to add, remove, start and
* stop services.
*/
#include "ndrtypes.ndl"
/* Windows NT */
/* Windows 2000 */
/* Windows XP and Windows Server 2003 */
/* Windows Vista */
/*
* Standard opaque 20 byte RPC handle.
*/
};
/*
* The svc_status (SERVICE_STATUS) structure contains information about a
* service. The ControlService, EnumDependentServices, EnumServicesStatus,
* and QueryServiceStatus functions use this structure to return information
* about a service. A service uses this structure in the SetServiceStatus
* function to report its current status to the service control manager.
*
* service_type
* The type of service. This member can be one of the following values.
*
* SERVICE_FILE_SYSTEM_DRIVER
* SERVICE_KERNEL_DRIVER
* SERVICE_WIN32_OWN_PROCESS
* SERVICE_WIN32_SHARE_PROCESS
*
* If the service type is either SERVICE_WIN32_OWN_PROCESS or
* SERVICE_WIN32_SHARE_PROCESS, and the service is running in
* the context of the LocalSystem account, the following type
* may also be specified to indicate that the service can
* interact with the desktop.
*
* SERVICE_INTERACTIVE_PROCESS
*
* cur_state
* The current state of the service. This member can be one of the
* following values.
*
* SERVICE_CONTINUE_PENDING
* SERVICE_PAUSE_PENDING
* SERVICE_PAUSED
* SERVICE_RUNNING
* SERVICE_START_PENDING
* SERVICE_STOP_PENDING
* SERVICE_STOPPED
*
* ctrl_accepted
* The control codes that the service will accept and process in its
* handler function (see Handler and HandlerEx). A user interface
* process can control a service by specifying a control command in
* the ControlService function. By default, all services accept the
* SERVICE_CONTROL_INTERROGATE value. The following are the control
* codes.
*
* SERVICE_ACCEPT_STOP
* SERVICE_ACCEPT_PAUSE_CONTINUE
* SERVICE_ACCEPT_SHUTDOWN
* SERVICE_ACCEPT_PARAMCHANGE
* SERVICE_ACCEPT_NETBINDCHANGE
*
* w32_exitcode
* An error code that the service uses to report an error that occurs when
* it is starting or stopping. To return an error code specific to the
* service, the service must set this value to ERROR_SERVICE_SPECIFIC_ERROR
* to indicate that the dwServiceSpecificExitCode member contains the error
* code. The service should set this value to NO_ERROR when it is running
* and on normal termination.
*
* svc_specified_exitcode
* A service-specific error code that the service returns when an error
* occurs while the service is starting or stopping. This value is ignored
* unless the w32_exitcode member is set to ERROR_SERVICE_SPECIFIC_ERROR.
*
* check_point
* A value that the service increments periodically to report its progress
* during a lengthy start, stop, pause, or continue operation. For example,
* the service should increment this value as it completes each step of its
* initialization when it is starting up. The user interface program that
* invoked the operation on the service uses this value to track the progress
* of the service during a lengthy operation. This value is not valid and
* should be zero when the service does not have a start, stop, pause, or
* continue operation pending.
*
* wait_hint
* An estimate of the amount of time, in milliseconds, that the service
* expects a pending start, stop, pause, or continue operation to take
* before the service makes its next call to the SetServiceStatus
* function with either an incremented check_point value or a change in
* dwCurrentState. If the amount of time specified by wait_hint passes,
* and check_point has not been incremented, or cur_state has not changed,
* the service control manager or service control program can assume that
* an error has occurred and the service should be stopped.
*/
};
};
};
/*
***********************************************************************
* Close
***********************************************************************
*/
};
/*
***********************************************************************
* OpenManager
***********************************************************************
*/
};
/*
***********************************************************************
* OpenService
***********************************************************************
*/
};
/*
***********************************************************************
* QueryServiceStatus
***********************************************************************
*/
};
/*
***********************************************************************
* EnumServicesStatus
*
* This should probably be:
* ...
* INOUT DWORD buf_size;
* SIZE_IS(buf_size)
* OUT BYTE *services;
* OUT DWORD bytes_needed;
* OUT DWORD svc_num;
* INOUT DWORD *resume_handle;
* ...
***********************************************************************
*/
};
/*
***********************************************************************
* QueryServiceConfig
***********************************************************************
*/
};
/*
***********************************************************************
* GetServiceDisplayNameW
***********************************************************************
*/
};
/*
***********************************************************************
* GetServiceKeyNameW
***********************************************************************
*/
};
/*
***********************************************************************
* The SVCCTL interface definition.
***********************************************************************
*/
INTERFACE(0)
};
#endif /* _MLSVC_SVCCTL_NDL_ */