ILegacyIAccessibleProvider::GetSelection 方法 (uiautomationcore.h)

擷取 控制項中選取的專案。

語法

HRESULT GetSelection(
  [out] SAFEARRAY **pvarSelectedChildren
);

參數

[out] pvarSelectedChildren

類型: SAFEARRAY**

接收 SAFEARRAY 的指標,其中包含選取的專案。

傳回值

類型: HRESULT

如果此方法成功,則會傳回 S_OK。 否則,它會傳回 HRESULT 錯誤碼。

規格需求

   
最低支援的用戶端 Windows 7、Windows Vista SP2 和 Windows Vista 平臺更新、Windows XP SP3 和 Windows Vista 平臺更新 [傳統型應用程式 |UWP 應用程式]
最低支援的伺服器 Windows Server 2008 R2、Windows Server 2008 SP2 和 Platform Update for Windows Server 2008、Windows Server 2003 SP2 和 Platform Update for Windows Server 2008 [傳統型應用程式 |UWP 應用程式]
目標平台 Windows
標頭 uiautomationcore.h (包含 UIAutomation.h)
Dll Uiautomationcore.dll

另請參閱

使用安全陣列的最佳做法

概念

ILegacyIAccessibleProvider

參考