GetTenantRestrictionsHostnames 函式

GetTenantRestrictionsHostnames函式會傳回 (清單 hostnames ,例如 foo.ca) 和 subdomainSupportedHostnames (例如 .bar.ca) 給呼叫者。 此清單會由 Windows 保持同步,並由應用程式用來將 租使用者限制 套用至這些端點。

語法

STDAPI GetTenantRestrictionsHostnames(
  _Out_  LPWSTR**  hostnames,
  _Out_  UINT32*   hostnameCount,
  _Out_  LPWSTR**  subdomainSupportedHostnames,
  _Out_  UINT32*   subdomainSupportedHostnameCount
);

參數

hostnames [out]

主機名稱 包含必須完全符合的名稱。 例如,如果 foo.ca 位於清單中,則 foo.ca應該受限於租使用者限制,但 bar.foo.ca不應該

hostnameCount [out]

hostnameCount參數包含陣列中的 hostnames 主機名稱數目。

subdomainSupportedHostnames [out]

subdomainSupportedHostnames包含允許子域的名稱,例如,如果 .bar.ca 位於清單中, sub.bar.ca則應該受限於租使用者限制,但 bar.ca不應該。 這些專案預期前面會有 . ,以利比對。

subdomainSupportedHostnameCount [out]

subdomainSupportedHostnameCount參數包含陣列中的 subdomainSupportedHostnames 主機名稱數目。

傳回值

如果函式成功,函式會傳 S_OK 回 。

備註

呼叫端應該使用 CoTaskMemFree 反復釋放陣列專案,然後釋放陣列本身。

關於空陣列:

  • 雖然這兩個清單都不是空的) 但實際上並非預期有效 (。
  • 其中一個清單在另一個清單不包含專案時有效。

不論是哪一種情況,都不需要取消配置空白清單。 如果傳回值不是 S_OK ,則不需要取消配置。

函式不會傳回 以外的 S_OK 成功值。

此函式沒有相關聯的匯入程式庫或標頭檔;您必須使用 LoadLibraryGetProcAddress 函式來呼叫它。

規格需求

需求
最低支援的用戶端 Windows 10版本 2004 [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 版本 2004 [僅限傳統型應用程式]
DLL TenantRestrictionsPlugin.dll