indexing-service

How to check whether windows file indexing is ON or OFF

蓝咒 提交于 2019-12-12 13:13:11
问题 Is there an API in C that I can use to check whether file indexing is on or off? Code is appreciated. 回答1: WMI is a pain in C++, but the native Service API is pretty clean. SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT); if(hSCManager) { SC_HANDLE hService = OpenService(hSCManager, _T("ServiceNameGoesHere"), SERVICE_QUERY_STATUS); if(hService) { // service is installed SERVICE_STATUS ServiceStatus; if(ServiceQueryStatus(hService, &ServiceStatus)) { // service is running

Check if Microsoft OLE DB Provider for Index Server (aka Provider=MSIDXS) is installed?

我是研究僧i 提交于 2019-12-08 12:58:04
问题 I use Windows Server 2008 R2 and ASP.NET 4.6.1. How can I check if Microsoft OLE DB Provider for Index Server (Provider= MSIDXS ) is installed ? Maybe get a list the OLEDB providers available in the system. 回答1: I try this code. I don't know now if applies to all 32bit and 64bit providers . Guid for CLSID OLEDB is C8B522D0-5CF3-11ce-ADE5-00AA0044773D internal static Guid IID_IUnknown = new Guid("00000000-0000-0000-c000-000000000046"); internal static Guid CLSID_DataLinks = new Guid("2206CDB2