IAppHostMappingExtension::MapPath 方法

使用站点名称和虚拟路径将站点映射到物理路径、虚拟目录和应用程序路径。

语法

HRESULT MapPath(  
   [in,  
   string] BSTR bstrSiteName,  
   [in,  
   string] BSTR bstrVirtualPath,  
   [out,  
   string] BSTR* pbstrPhysicalPath,  
   [out] IAppHostElement** ppVirtualDirectoryElement,  
   [out] IAppHostElement** ppApplicationElement  
);  

parameters

bstrSiteName
一个 BSTR 包含站点名称的 。

bstrVirtualPath
包含 BSTR 虚拟路径的 。

pbstrPhysicalPath
指向 BSTR 包含物理路径的 的指针。

ppVirtualDirectoryElement
指向 IAppHostElement 接口的指针的指针。

ppApplicationElement
指向 IAppHostElement 接口的指针的指针。

返回值

HRESULT。 可能的值包括(但并不限于)下表中的项。

说明
S_OK 指示操作成功。

要求

类型 说明
客户端 - 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
Header Ahadmin.h

另请参阅

IAppHostMappingExtension 接口