Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method retrieves information about the specified number of locales in an array of RFC1766INFOstructures.

Syntax

HRESULT Next( 
  ULONG 
celt,
  PRFC1766INFO 
rgelt,
  ULONG* 
pceltFetched
);

Parameters

celt

[in] Number of RFC1766INFOstructures the client wants returned. This parameter also specifies the number of RFC1766INFOelements for which the rgeltarray has been allocated.

rgelt

[out] Pointer to the array in which to return the RFC1766INFOstructures. The calling application must free the array by using the task allocator.

pceltFetched

[out] Pointer to an unsigned integer that receives the number of RFC1766INFOstructures actually returned in the array pointed to by the rgeltparameter. This number can be smaller than the value specified in the celtparameter.

Return Value

The following table shows the possible return values for this method.

Value Description

S_OK

The RFC1766INFOarray 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 celtis 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 RFC1766INFOstructures retrieved is returned in the pceltFetchedparameter. The IEnumRfc1766::Nextmethod also advances the position of the Locale Enumeration object in the enumeration sequence.

Example Code

The following code example shows a client retrieving the RFC1766INFOstructures for the first ten locales in the enumeration sequence.

Copy Code
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);
}

Requirements

Header mlang.h, mlang.idl
Library mlang.dll
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later