术语 | setservicebits |
释义 | SetServiceBits 语法: C++ BOOL WINAPI SetServiceBits( __in SERVICE_STATUS_HANDLE hServiceStatus, __in DWORD dwServiceBits, __in BOOL bSetBitsOn, __in BOOL bUpdateImmediately ); SetServiceBits功能 注册一个服务控制管理器和服务器服务的服务类型。服务器服务可以作为一个宣布它目前支持的注册服务类型。在NetServerGetInfo和职能取得的NetServerEnum指定机器的支持的服务类型。 参数 hServiceStatus [in] 一个句柄,的服务状态信息结构。一个服务获取处理调用RegisterServiceCtrlHandlerEx功能。 dwServiceBits [in] 服务类型。 某些位标志(0xC00F3F7B)是保留给微软使用。该SetServiceBits函数失败如果其中任何一个位标志设置在dwServiceBits错误ERROR_INVALID_DATA。以下位标志保留给微软使用。 位flagValue SV_TYPE_WORKSTATION0x00000001 SV_TYPE_SERVER0x00000002 SV_TYPE_DOMAIN_CTRL0x00000008 SV_TYPE_DOMAIN_BAKCTRL0x00000010 SV_TYPE_TIME_SOURCE0x00000020 SV_TYPE_AFP0x00000040 SV_TYPE_DOMAIN_MEMBER0x00000100 SV_TYPE_PRINTQ_SERVER0x00000200 SV_TYPE_DIALIN_SERVER0x00000400 SV_TYPE_XENIX_SERVER0x00000800 SV_TYPE_SERVER_UNIX0x00000800 SV_TYPE_NT0x00001000 SV_TYPE_WFW0x00002000 SV_TYPE_POTENTIAL_BROWSER0x00010000 SV_TYPE_BACKUP_BROWSER0x00020000 SV_TYPE_MASTER_BROWSER0x00040000 SV_TYPE_DOMAIN_MASTER0x00080000 SV_TYPE_LOCAL_LIST_ONLY0x40000000 SV_TYPE_DOMAIN_ENUM0x80000000 某些位标志(0x00300084)是由Microsoft定义,但没有具体的系统软件保留。以下是这些位标志。 位flagValue SV_TYPE_SV_TYPE_SQLSERVER0x00000004 SV_TYPE_NOVELL0x00000080 SV_TYPE_DOMAIN_CTRL0x00100000 SV_TYPE_DOMAIN_BAKCTRL0x00200000 某些位标志(0x3FC0C000)不是由微软的定义,其使用并未得到微软的协调。应用程序开发人员使用这些位应该知道,其他应用还可以使用它们,从而造成冲突。以下是这些位标志。 0x00004000 0x00008000 0x00400000 0x00800000 0x01000000 0x02000000 0x04000000 0x08000000 0x10000000 0x20000000 bSetBitsOn [in] 如果该值为TRUE,在dwServiceBit的位被设置。如果该值为FALSE,该位被清除。 bUpdateImmediately [in] 如果该值为TRUE,则服务器服务是执行立即更新。如果该值为FALSE,则更新不立即执行。 返回值 如果函数成功,返回值为非零。 如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderLmserver.h LibraryAdvapi32.lib DLLAdvapi32.dll 参见 NetServerGetInfo 的NetServerEnum RegisterServiceCtrlHandlerEx 服务函数 SetServiceStatus 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年8月27日 ==英文原文==SetServiceBits Function Registers a service type with the service control manager and the Server service. The Server service can then announce the registered service type as one it currently supports. The NetServerGetInfo and NetServerEnum functions obtain a specified machine's supported service types. Syntax C++ BOOL WINAPI SetServiceBits( __in SERVICE_STATUS_HANDLE hServiceStatus, __in DWORD dwServiceBits, __in BOOL bSetBitsOn, __in BOOL bUpdateImmediately ); Parameters hServiceStatus [in] A handle to the status information structure for the service. A service obtains the handle by calling the RegisterServiceCtrlHandlerEx function. dwServiceBits [in] The service type. Certain bit flags (0xC00F3F7B) are reserved for use by Microsoft. The SetServiceBits function fails with the error ERROR_INVALID_DATA if any of these bit flags are set in dwServiceBits. The following bit flags are reserved for use by Microsoft. Bit flagValue SV_TYPE_WORKSTATION0x00000001 SV_TYPE_SERVER0x00000002 SV_TYPE_DOMAIN_CTRL0x00000008 SV_TYPE_DOMAIN_BAKCTRL0x00000010 SV_TYPE_TIME_SOURCE0x00000020 SV_TYPE_AFP0x00000040 SV_TYPE_DOMAIN_MEMBER0x00000100 SV_TYPE_PRINTQ_SERVER0x00000200 SV_TYPE_DIALIN_SERVER0x00000400 SV_TYPE_XENIX_SERVER0x00000800 SV_TYPE_SERVER_UNIX0x00000800 SV_TYPE_NT0x00001000 SV_TYPE_WFW0x00002000 SV_TYPE_POTENTIAL_BROWSER0x00010000 SV_TYPE_BACKUP_BROWSER0x00020000 SV_TYPE_MASTER_BROWSER0x00040000 SV_TYPE_DOMAIN_MASTER0x00080000 SV_TYPE_LOCAL_LIST_ONLY0x40000000 SV_TYPE_DOMAIN_ENUM0x80000000 Certain bit flags (0x00300084) are defined by Microsoft, but are not specifically reserved for systems software. The following are these bit flags. Bit flagValue SV_TYPE_SV_TYPE_SQLSERVER0x00000004 SV_TYPE_NOVELL0x00000080 SV_TYPE_DOMAIN_CTRL0x00100000 SV_TYPE_DOMAIN_BAKCTRL0x00200000 Certain bit flags (0x3FC0C000) are not defined by Microsoft, and their use is not coordinated by Microsoft. Developers of applications that use these bits should be aware that other applications can also use them, thus creating a conflict. The following are these bit flags. 0x00004000 0x00008000 0x00400000 0x00800000 0x01000000 0x02000000 0x04000000 0x08000000 0x10000000 0x20000000 bSetBitsOn [in] If this value is TRUE, the bits in dwServiceBit are to be set. If this value is FALSE, the bits are to be cleared. bUpdateImmediately [in] If this value is TRUE, the Server service is to perform an immediate update. If this value is FALSE, the update is not be performed immediately. Return Value 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 . Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderLmserver.h LibraryAdvapi32.lib DLLAdvapi32.dll See Also NetServerGetInfo NetServerEnum RegisterServiceCtrlHandlerEx Service Functions SetServiceStatus Send comments about this topic to Microsoft Build date: 8/27/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/ms686239(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。