我做了一个服务程序, 在服务列表中可以看到该服务,但是没有描述信息,请问该如何添加描述信息
解决方案 »
- 新年快乐!在技术区散个分
- 散分啦~~来者有分~~~UP有分~~
- 西安 聘兼职软件开发
- 100分求救,显示HMODULE的内容!在线等,马上结贴
- 有哪位用过ExpressBars吗?请问怎样将每个工具条最右的一个小箭头去掉,按它还会出来个下拉菜单?3Q
- 求救word文件存入数据库中 用的TBlobField 在uses 用到什么?
- 先显示窗口A,然后紧接着在A上显示B设置窗口,应该怎么写程序??菜鸟先谢过了!
- 记录集
- cxgird 关于改变单元格值
- 这个问题烦了我两天了,请高手指点一下,我在FORM上放了两个panel,两个panel上分别放了两个stringgrid,中间放了一个splitter,运行后没有问题,可是我无法访stringgrid1.cells[]的值,这是为什么?真奇怪??
- 请高人转换下面VB代码,关于读取UCS2编码的txt文档
- FastReport,打印动态字段的简单问题
Platform SDK: DLLs, Processes, and Threads
ChangeServiceConfig2The ChangeServiceConfig2 function changes the optional configuration parameters of a service.
BOOL ChangeServiceConfig2(
SC_HANDLE hService,
DWORD dwInfoLevel,
LPVOID lpInfo
);Parameters
hService
[in] Handle to the service. This handle is returned by the OpenService or CreateService function and must have the SERVICE_CHANGE_CONFIG access right. For more information, see Service Security and Access Rights.
If one of the specified service controller actions is SC_ACTION_RESTART, hService must have the SERVICE_START access right.dwInfoLevel
[in] Configuration information to be changed. This parameter can be one of the following values. Value Meaning
SERVICE_CONFIG_DESCRIPTION The lpInfo parameter is a pointer to a SERVICE_DESCRIPTION structure.
SERVICE_CONFIG_FAILURE_ACTIONS The lpInfo parameter is a pointer to a SERVICE_FAILURE_ACTIONS structure.
If you specify SC_ACTION_REBOOT, the caller must have the SE_SHUTDOWN_NAME privilege. For more information, see Running with Special Privileges.
lpInfo
[in] Pointer to the new value to be set for the configuration information. The format of this data depends on the value of the dwInfoLevel parameter. If this value is NULL, the information remains unchanged.
Return Values
If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, call GetLastError.Res
The ChangeServiceConfig2 function changes the optional configuration information for the specified service in the service control manager database. You can obtain the current optional configuration information by using the QueryServiceConfig2 function.You cannot set the SERVICE_CONFIG_FAILURE_ACTIONS value for a service that shares the service control manager's process. This includes all services whose executable image is "services.exe".You can change and query additional configuration information using the ChangeServiceConfig and QueryServiceConfig functions, respectively.Example Code
For an example, see Changing a Service Configuration.Requirements
Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Unicode: Implemented as Unicode and ANSI versions.
Header: Declared in Winsvc.h; include Windows.h.
Library: Use Advapi32.lib.
See Also
Services Overview, Service Functions, ChangeServiceConfig, CreateService, OpenService, QueryServiceConfig, QueryServiceConfig2, SERVICE_DESCRIPTION, SERVICE_FAILURE_ACTIONSPlatform SDK Release: February 2003 What did you think of this topic?
Order a Platform SDK CD Requirements
Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Unicode: Implemented as Unicode and ANSI versions.
Header: Declared in Winsvc.h; include Windows.h.
Library: Use Advapi32.lib.See Also
Services Overview, Service Functions, ChangeServiceConfig, CreateService, OpenService, QueryServiceConfig, QueryServiceConfig2, SERVICE_DESCRIPTION, SERVICE_FAILURE_ACTIONS