Partager via


IAppHostConfigLocationCollection::AddLocation, méthode

Ajoute un nouvel emplacement de configuration à la collection.

Syntaxe

HRESULT AddLocation(  
   [in,  
   string] BSTR bstrLocationPath,  
   [out,  
   retval] IAppHostConfigLocation** ppNewLocation  
);  

Paramètres

bstrLocationPath
BSTR qui contient le chemin du nouvel emplacement de configuration.

ppNewLocation
Pointeur vers un pointeur pour une interface IAppHostConfigLocation .

Valeur renvoyée

Élément HRESULT. Les valeurs possibles sont notamment celles figurant dans le tableau suivant.

Valeur Description
S_OK Indique que l’opération a réussi.
ERROR_ALREADY_EXISTS Indique que l’emplacement existe déjà.

Spécifications

Type Description
Client - IIS 7.0 sur Windows Vista
- IIS 7.5 sur Windows 7
- IIS 8.0 sur Windows 8
- IIS 10.0 sur Windows 10
Serveur - IIS 7.0 sur Windows Server 2008
- IIS 7.5 sur Windows Server 2008 R2
- IIS 8.0 sur Windows Server 2012
- IIS 8.5 sur Windows Server 2012 R2
- IIS 10.0 sur Windows Server 2016
Produit - 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
En-tête Ahadmin.h

Voir aussi

IAppHostConfigLocationCollection, interface