Platform SDK: Network Management |
The McastEnumerateScopes function enumerates multicast scopes available on the network.
DWORD APIENTRY McastEnumerateScopes( IP_ADDR_FAMILY AddrFamily, BOOL ReQuery, PMCAST_SCOPE_ENTRY pScopeList, PDWORD pScopeLen, PDWORD pScopeCount );
If pScopeList is a valid pointer on input, the scope list is returned.
If pScopeList is NULL on input, the length of the buffer required to hold the scope list is returned.
If the buffer pointed to in pScopeList is NULL on input, McastEnumerateScopes forces a requerying of scope lists from MCAST servers.
To determine the size of buffer required to hold scope list data, set pScopeList to NULL and pScopeLen to a non-NULL value. The McastEnumerateScopes function will then return ERROR_SUCCESS and store the size of the scope list data, in bytes, in pScopeLen.
The pScopeLen parameter cannot be NULL. If the buffer pointed to by pScopeList is not large enough to hold the scope list data, McastEnumerateScopes returns ERROR_MORE_DATA and stores the required buffer size, in bytes, in pScopeLen.
To determine the size of buffer required to hold scope list data, set pScopeList to NULL and pScopeLen to a non-NULL value. The McastEnumerateScopes function will then return ERROR_SUCCESS and store the size of the scope list data, in bytes, in pScopeLen.
If the function succeeds, it returns ERROR_SUCCESS.
If the buffer pointed to by pScopeList is too small to hold the scope list, the McastEnumerateScopes function returns ERROR_MORE_DATA, and stores the required buffer size, in bytes, in pScopeLen.
If the McastApiStartup function has not been called (it must be called before any other MADCAP client functions may be called), the McastEnumerateScopes function returns ERROR_NOT_READY.
The McastEnumerateScopes function queries multicast scopes for each network interface, and the interface on which the scope is retrieved is returned as part of the pScopeList parameter. Therefore, on multihomed computers it is possible that some scopes will get listed multiple times; once for each interface.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Madcapcl.h.