重要事項
DualEngine API 是有限存取功能的一部分 (詳見 LimitedAccessFeatures 類別) 。 欲了解更多資訊或申請解鎖令牌,請聯絡 Microsoft 支援服務。
interface IDualEngine20BrowserSession
: public IUnknown
代表 Internet Explorer 的處理會話。
摘要
| 成員 | 描述 |
|---|---|
| CloneActiveTabRecoveryData | 會複製一個活躍分頁的復原資料。 |
| CloneInactiveTabRecoveryData | 會重複一個非活躍分頁的復原資料。 |
| CreateDualEngineBrowser | 在此會話中建立一個瀏覽器物件。 |
| 刪除所有但可恢復的恢復檔案 | 刪除除了提供的分頁復原資料檔案外的所有檔案。 |
| 刪除非活躍區域恢復資料 | 刪除一個不活躍區域的分頁恢復資料。 |
| GetRequestedHostForwardedAccelerators | 回傳一份鍵盤加速器清單,應該由主機轉發。 |
| Initialize | 初始化會話。 |
| ParseEmieSitelist | 依所提供路徑解析 sitelist 的 XML。 |
| SetConfigurableSitesFlags | 設定標誌來決定可配置網站的處理方式。 |
| 設定延遲偵測訊息 | 設定掛機偵測訊息,由主機發送給會話以偵測掛機。 |
| SetHostIntranetInInternetExplorer | 設定是否在會話中開啟所有內聯網站點。 |
| SetHybridMode | 設定是否啟用混合模式站點清單處理。 |
| 設定反轉CookieSync | 設定 Cookie 變更是否同步回主機。 |
| SetSitePermissions | 設定會話的網站權限。 |
| SetUseAdditionalHangDetection | 設定是否啟用額外的掛機偵測。 |
| ShowDownloadWindow | 顯示 Internet Explorer 下載視窗。 |
| 同步Cookies | 將 Cookie 資料傳送給會話程序。 |
適用於
| 產品 | 已導入 |
|---|---|
| Windows 10,版本 20H1 | KB5032278 |
| Windows 11,版本 22H2 | KB5032288 |
成員
CloneActiveTabRecoveryData
會複製一個活躍分頁的復原資料。
public HRESULT CloneActiveTabRecoveryData (HWND hwndBrowser, REFGUID guidSrcFile, REFGUID guidDestFile)
參數
hwndBrowser是託管瀏覽器視窗的硬體介面。guidSrcFile複製來源復原資料檔案的 GUID。guidDestFile用來關聯新的分頁復原資料檔案的 GUID。
CloneInactiveTabRecoveryData
會重複一個非活躍分頁的復原資料。
public HRESULT CloneInactiveTabRecoveryData (REFGUID guidSrcFile, REFGUID guidDestFile)
參數
guidSrcFile複製來源復原資料檔案的 GUID。guidDestFile用來關聯新的分頁復原資料檔案的 GUID。
CreateDualEngineBrowser
在此會話中建立一個瀏覽器物件。
public HRESULT CreateDualEngineBrowser (IDualEngine20Browser ** ppDualEngineBrowser)
參數
-
ppDualEngineBrowser新的瀏覽器物件。
刪除所有但可恢復的恢復檔案
刪除除了提供的分頁復原資料檔案外的所有檔案。
public HRESULT DeleteAllButRecoverableRecoveryFiles (int cRecoverableGUIDs, LPCWSTR * rgpszRecoverableGUIDs)
參數
cRecoverableGUIDsGUID 的rgpszRecoverableGUIDs數量。rgpszRecoverableGUIDs一組 GUID 陣列代表不可刪除的分頁復原資料檔案。
刪除非活躍區域恢復資料
刪除一個不活躍區域的分頁恢復資料。
public HRESULT DeleteInactiveRegionRecoveryData (REFGUID guidTabId)
參數
-
guidTabId要刪除的復原資料的 GUID。
GetRequestedHostForwardedAccelerators
回傳一份鍵盤加速器清單,應該由主機轉發。
public HRESULT GetRequestedHostForwardedAccelerators (DWORD * pcAccels, ACCELERATOR ** prgAccels)
參數
pcAccels加速器數量為prgAccels。prgAccels一份應該轉發的鍵盤加速器清單。 完成後,呼叫者必須釋放分配給 的CoTaskMemFree清單記憶體。
初始化
初始化會話。
public HRESULT Initialize (DWORD cAccels, ACCELERATOR * rgHostPriorityAccels, IDualEngine20BrowserSessionObserver * pSessionObserver, LPCWSTR pszProfilePath, LPCWSTR pszProfileId)
參數
cAccels加速器數量為rgHostPriorityAccels。rgHostPriorityAccels一串鍵盤加速器清單,用來讓會話轉發給主機。pSessionObserver本會期的觀察員。pszProfilePath連線到主機設定檔路徑的路徑,會話會在那裡儲存相關檔案。pszProfileId主持人的個人檔案 ID 用於與此會話關聯。
ParseEmieSitelist
依所提供路徑解析 sitelist 的 XML。
public HRESULT ParseEmieSitelist (LPCWSTR emieXmlPath)
參數
-
emieXmlPath解析 sitelist XML 的路徑。
SetConfigurableSitesFlags
設定標誌來決定可配置網站的處理方式。
public HRESULT SetConfigurableSitesFlags (DualEngineConfigurableSitesFlags flags)
參數
-
flags這些旗標顯示可配置網站的處理方式。
設定延遲偵測訊息
設定掛機偵測訊息,由主機發送給會話以偵測掛機。
public HRESULT SetHangDetectionMessages (UINT uiSyncHungCheckMsg, UINT uiAsyncHungCheckMsg)
參數
uiSyncHungCheckMsg主機將同步等待處理的訊息視窗訊息 ID。uiAsyncHungCheckMsg主機將非同步等待的視窗訊息 ID。 瀏覽器透過呼叫 IDualEngine20BrowserObserver::OnAsyncHungCheckReply () 來向主機發出訊號。
SetHostIntranetInInternetExplorer
設定是否在會話中開啟所有內聯網站點。
public HRESULT SetHostIntranetInInternetExplorer (BOOL fEnable)
參數
-
fEnable若true,導向內聯網站點將保留在會話中;否則,是否會停留在會話中,則依照預設的判定邏輯決定。
SetHybridMode
設定是否啟用混合模式站點清單處理。
public HRESULT SetHybridMode (BOOL fEnable)
參數
-
fEnable若true,則在處理網站列表網址時啟用混合模式行為;否則則恢復正常的導航行為。
設定反轉CookieSync
設定 Cookie 變更是否同步回主機。
public HRESULT SetReverseCookieSync (BOOL fEnable)
參數
-
fEnable若true,主機將由 IDualEngine20BrowserSessionObserver::ReverseSyncCookies () 事件通知 cookie 變更;否則則不會通知。
SetSitePermissions
設定會話的網站權限。
public HRESULT SetSitePermissions (SITE_PERMISSION_KIND sitePermissionKind, LPCWSTR pszPermissionData)
參數
sitePermissionKind所設定的網站權限類型。pszPermissionData一個序列化的權限資料字串。
pszPermissionData 是以下 BNF 格式中的字串:
permission-data = default-action CRLF site-permissions
; Indicates the default action to take if there is no specific rule for the URI.
; DefaultAllow - Allow permission requests.
; DefaultAsk - Prompt the user for how they want to respond to the request.
; DefaultBlock - Block permission requests.
default-action = "DefaultAllow" | "DefaultAsk" | "DefaultBlock"
; A list of sites and the action to take when permission is requested.
site-permissions = *(permission SP wildcard SP scheme-part SP host-part SP
port-part SP path-part CRLF)
; Indicates the action to take on a request.
; A - Allow permission requests.
; Q - Prompt the user for how they want to respond to the request.
; B - Block permission requests.
permission = "A" | "Q" | "B"
; Indicates if the host contains a domain wildcard.
wildcard = BIT
; Can be either a specific scheme, a wildcard to match all schemes, or "!" to indicate no scheme.
scheme-part = "*" | "!" | scheme
; Can be either a specific hostname or a wildcard to match all hostnames.
host-part = "*" | host
; Represents a mostly typical URI host.
; The exception is that the host may start with a domain wildcard (e.g [*.]) which matches the host
; and any subdomains.
host = ([ subdomain-wildcard ] reg-name) | IPv4address | IP-literal
subdomain-wildcard = "[*.]"
; Can be either a specific path or a wildcard to match all paths.
path-part = "*" | path
; Can be either a specific port or a wildcard to match all ports.
port-part = "*" | port
port = *DIGIT
; For definitions of the following rules, see RFC 3986 Appendix A (https://www.rfc-editor.org/rfc/rfc3986#appendix-A):
; scheme, reg-name, IPv4address, IP-literal, path
另請參閱:
- 附錄 A。收集 RFC3986 - URI) 統一資源識別碼 (URI 的 ABNF:通用語法。
SetUseAdditionalHangDetection
設定是否啟用額外的掛機偵測。
公開 HRESULT 集合 使用額外掛機偵測 (BOOL fEnable)
參數
-
fEnable若true,則會啟用額外的掛機偵測;否則則不會。
ShowDownloadWindow
顯示 Internet Explorer 下載視窗。
公開 HRESULT ShowDownloadWindow ()
同步Cookies
將 Cookie 資料傳送給會話程序。
公開 HRESULT SyncCookies (const DualEngineCookies * pCookies, DWORD cCookies)
參數
pCookies一組要傳送到會話的 cookie。cCookies中pCookies項目的數量。