使用網站名稱和虛擬路徑,將網站對應至實體路徑、虛擬目錄和應用程式路徑。
語法
HRESULT MapPath(
[in,
string] BSTR bstrSiteName,
[in,
string] BSTR bstrVirtualPath,
[out,
string] BSTR* pbstrPhysicalPath,
[out] IAppHostElement** ppVirtualDirectoryElement,
[out] IAppHostElement** ppApplicationElement
);
參數
bstrSiteName
BSTR包含網站名稱的 。
bstrVirtualPath
BSTR,包含虛擬路徑。
pbstrPhysicalPath
包含實體路徑的 指標 BSTR 。
ppVirtualDirectoryElement
IAppHostElement介面指標的指標。
ppApplicationElement
IAppHostElement介面指標的指標。
傳回值
HRESULT。 可能的值包括 (但不限於) 下表中的這些值。
| 值 | 描述 |
|---|---|
| S_OK | 表示作業成功。 |
規格需求
| 類型 | 描述 |
|---|---|
| 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 |
| 標頭 | Ahadmin.h |