IGPM::GetRSOP 方法 (gpmgmt.h)

建立並傳回 GPMRSOP。 您可以指定原則的結果集 (RSoP) 模式和 Windows Management Instrumentation (WMI) 命名空間。

語法

HRESULT GetRSOP(
  [in]  GPMRSOPMode gpmRSoPMode,
  [in]  BSTR        bstrNamespace,
  [in]  long        lFlags,
  [out] IGPMRSOP    **ppIGPMRSOP
);

參數

[in] gpmRSoPMode

必要。 要在其中開啟物件的模式。 支援下列模式。

rsopPlanning

指定 RSoP 規劃模式

rsopLogging

指定 RSoP 記錄模式

rsopUnknown

只有在指定 bstrNamespace 參數時才有效

若要執行查詢,RSoP 規劃模式需要執行 Windows Server 的網域控制站。

[in] bstrNamespace

IGPMRSOPGPMRSOP GPMRSOP的 WMI 命名空間。 使用以 Null 結尾的字串。 此參數可以是 Null。 如需如何擷取命名空間的詳細資訊,請參閱一節。

[in] lFlags

此參數必須是零。

[out] ppIGPMRSOP

IGPMRSOP介面指標的位址。

傳回值

C++

如果成功 則傳回S_OK。 如果發生錯誤,則傳回失敗碼。

JScript

傳回 GPMRSOP 物件的參考。

VB

傳回 GPMRSOP 物件的參考。

備註

若要擷取 WMI 命名空間,請呼叫IGPMRSOP介面的Namespace屬性方法。 或者,呼叫RsopLoggingModeProviderRsopPlanningModeProvider WMI 類別的RsopCreateSession方法。 如需這些方法的詳細資訊,請參閱群組原則檔。

需求

   
最低支援的用戶端 Windows Vista
最低支援的伺服器 Windows Server 2008
目標平台 Windows
標頭 gpmgmt.h
Dll Gpmgmt.dll

另請參閱

IGPM

IGPMRSOP