共用方式為


IHttpServer::RegisterFileChangeMonitor 方法

註冊特定目錄的檔案變更通知。

語法

virtual HRESULT RegisterFileChangeMonitor(  
   PCWSTR pszPath,  
   HANDLE hToken,  
   IHttpFileMonitor** ppFileMonitor  
) = 0;  

參數

pszPath
要監視的目錄路徑。

hToken
用於監視註冊的選擇性權杖。

ppFileMonitor
不再需要時應該釋放的監視物件。 此動作可能會停止檔案變更監視。

傳回值

HRESULT。

備註

需求

類型 描述
Client - Windows Vista 上的 IIS 7.0
- Windows 7 上的 IIS 7.5
- Windows 8 上的 IIS 8.0
- Windows 10上的 IIS 10.0
伺服器 - Windows Server 2008 上的 IIS 7.0
- Windows Server 2008 R2 上的 IIS 7.5
- Windows Server 2012 上的 IIS 8.0
- Windows Server 2012 R2 上的 IIS 8.5
- Windows Server 2016上的 IIS 10.0
產品 - IIS 7.0、IIS 7.5、IIS 8.0、IIS 8.5、IIS 10.0
- IIS Express 7.5、IIS Express 8.0、IIS Express 10.0
標頭 Httpserv.h