Retrieves information about the specified number of locales in an array of RFC1766INFO structures.
Syntax
HRESULT Next( ULONG celt, PRFC1766INFO rgelt, ULONG *pceltFetched );
Parameters
- celt
- [in] Number of RFC1766INFO structures the client would like returned. The celt parameter also specifies the number of RFC1766INFO elements for which the rgelt array has been allocated.
- rgelt
- [out] Address of the array in which to return the RFC1766INFO structures. The calling application must free the array by using the task allocator.
- pceltFetched
- [out] Address of a value that receives the number of RFC1766INFO structures actually returned in rgelt. This number can be smaller than the value specified in the celt parameter.
Return Value
Returns one of the following values:
S_OK The RFC1766INFO array has been successfully returned. S_FALSE No more information is available (for example, the end of the enumeration sequence has been reached). E_FAIL There is an error in the arguments, or an internal error has occurred.
Remarks
This method uses the enumeration sequence that the Locale Enumeration Object has created to obtain the information it requests. The retrieved information begins with the locale at the enumerator object's current position in the enumeration sequence and continues until the bound celt is met or the end of the enumeration sequence is reached. If the end of the enumeration sequence is met in this process, the number of RFC1766INFO structures retrieved is returned in the pceltFetched parameter. Next also advances the position of the Locale Enumeration Object in the enumeration sequence.
Windows CE
Windows CE Use version 2.12 and later Minimum availability Internet Explorer 4.0
Example
This example shows a client retrieving the RFC1766INFO structures for the first 10 locales in the enumeration sequence.
IEnumRfc1766* pEnumRfc1766 = NULL; HRESULT hr = pMultiLanguage->EnumRfc1766(&pEnumRfc1766); if(SUCCEEDED(hr)) { PRFC1766INFO prfcInfo; ULONG crfcInfo; prfcInfo = (PRFC1766INFO) CoTaskMemAlloc( sizeof(RFC1766INFO) * 10); pEnumRfc1766->Next(10, pcpInfo, &crfcInfo); // Operate on the information. CoTaskMemRealloc((void*) prfcInfo, sizeof(RFC1766INFO) * crfcInfo); }
See Also