Partager via


IEnumRfc1766::Next method

Gets information about the specified number of locales in an array of RFC1766INFO structures.

Syntax

HRESULT Next(
  [in]  unsigned long celt,
  [out] PRFC1766INFO  rgelt,
  [out] unsigned long *pceltFetched
);

Parameters

  • celt [in]
    Number of RFC1766INFO structures the client wants returned. The celt parameter also specifies the number of RFC1766INFO elements for which the rgelt array has been allocated.

  • rgelt [out]
    A pointer to the array in which to return the RFC1766INFO structures. The calling application must free the array by using the task allocator.

  • pceltFetched [out]
    A pointer to an unsigned integer that receives the number of RFC1766INFO structures returned in rgelt. This number can be smaller than the value specified in the celt parameter.

Return value

Returns one of the following values.

Return code Description
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 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. IEnumRfc1766::Next also advances the position of the Locale Enumeration Object in the enumeration sequence.

Examples

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

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mlang.h

IDL

Mlang.idl

DLL

Mlang.dll

See also

IEnumRfc1766

Reference

Reset

Skip