PeerGraphGetItemCount function (p2p.h)
The PeerGraphGetItemCount function retrieves the number of items in an enumeration.
NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGraphGetItemCount( [in] HPEERENUM hPeerEnum, [out] ULONG *pCount );
Handle to a peer graph.
Receives a pointer to the number of records in an enumeration.
If the function call succeeds, the return value is S_OK. Otherwise, it returns the following value.
||One parameter is not valid.|
||There is not enough memory to perform a specified operation.|
||A peer graph must be initialized with a call to PeerGraphStartup before using this function.|
Because some items can become invalid while an application is enumerating a set of items, the number of items returned from PeerGraphGetNextItem can be less than the number of items returned in pCount. The value of pCount indicates the number of items in an enumeration when the handle is created. Due to the dynamic nature of the Peer Infrastructure, it is not guaranteed that the number of items retrieved by using PeerGraphGetNextItem is equal to pCount.
|Minimum supported client||Windows XP with SP2 [desktop apps only],Windows XP with SP1 with the Advanced Networking Pack forWindows XP|
|Minimum supported server||None supported|