共用方式為


IPmCustomActions::RunCustomAction 方法

可讓背景工作進程架構向通訊協定管理員要求Run-Time狀態和控制資料的支援函式,並使用 ICustomActionResultCallback 介面回報結果。

語法

virtual HRESULT RunCustomAction(  
   IN PCWSTR pszFunctionName,  
   IN PCWSTR pszFunctionArgs,  
   IN ICustomActionResultCallback* pCompletionCallbackClass  
) = 0 ;  

參數

pszFunctionName
字串的指標,其中包含要執行的自訂Run-Time狀態和控制項動作的名稱。

pszFunctionArgs
字串的指標,其中包含要傳遞至 所 pszFunctionName 指定函式的引數。

pCompletionCallbackClass
將用來報告結果的 ICustomActionResultCallback 介面指標。

傳回值

HRESULT。 可能的值包括 (但不限於) 下表中的這些值。

描述
S_OK 表示作業成功,且自訂動作已排入佇列。 動作的結果將會使用 ICustomActionResultCallback::ReportResult 介面傳回。

規格需求

類型 描述
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
標頭 Wpframework.h

另請參閱

IPmCustomActions 介面
ICustomActionResultCallback::ReportResult 方法