LoadStringRCEx Function

Translates an HRESULT value to an appropriate error message for the specified culture.

This function has been deprecated in the .NET Framework version 4.

HRESULT LoadStringRCEx (
    [in]  LCID    lcid, 
    [in]  UINT    iResouceID, 
    [out] LPWSTR  szBuffer, 
    [in]  int     iMax, 
    [in]  int     bQuiet, 
    [out] int    *pcwchUsed
);

Parameters

  • lcid
    [in] A culture identifier. Pass -1 for lcid to use the default culture.

  • iResourceID
    [in] An HRESULT.

  • szBuffer
    [out] A buffer that contains the error message upon successful completion.

  • iMax
    [in] The size of the error message buffer.

  • bQuiet
    [in] Ignored.

  • pcwchUsed
    [out] A pointer to the length of the error message.

Return Value

This method returns standard COM error codes, as defined in WinError.h, in addition to the following values.

Return code

Description

S_OK

The method completed successfully.

E_INVALIDARG

szBuffer is null, or iMax is zero (0).

Remarks

If the method does not complete successfully, szBuffer contains an empty string.

Requirements

Platforms: See .NET Framework System Requirements.

Header: MSCorEE.h

Library: MSCorEE.dll

.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0

See Also

Reference

LoadStringRC Function

CultureInfo.LCID

Other Resources

.NET Framework 1.1 and 2.0 Hosting Global Static Functions