Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 2.17 KB

File metadata and controls

45 lines (35 loc) · 2.17 KB
title IAppHostElementCollection::Count Property
ms.date 10/07/2016
description IAppHostElementCollection Count Property returns the number of elements in the current collection.
ms.assetid e91d28c5-2287-b8e8-e2b0-55b81420a53f

IAppHostElementCollection::Count Property

Returns the number of elements in the current collection.

Syntax

HRESULT Count(  
   [out,  
   retval] DWORD* pcElementCount  
);  

Parameters

pcElementCount
A pointer to a DWORD that contains the number of elements.

Return Value

An HRESULT. Possible values include, but are not limited to, those in the following table.

Value Description
S_OK Indicates that the operation was successful.

Example

The following code example loops through all the child elements and properties of the system.applicationHost/sites configuration section in the MACHINE/WEBROOT/APPHOST commit path.

[!code-cppIAppHostAdminLibrary#2]

Requirements

Type Description
Client - IIS 7.0 on [!INCLUDEwinvista]
- IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server - IIS 7.0 on [!INCLUDEwinsrv2008]
- IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016
Product - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
- [!INCLUDEiisexp75], [!INCLUDEiisexp80], [!INCLUDEiisexp100]
Header Ahadmin.h

See Also

IAppHostElementCollection Interface