Share via


LoadStringRC Function

Translates an HRESULT value into an error message by using the default culture of the current thread.

HRESULT LoadStringRC (
        [in]  UINT    iResourceID, 
        [out] LPWSTR  szBuffer, 
        [in]  int     iMax, 
        [in]  int     bQuiet
);

Parameters

  • 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.

Return Value

This method returns standard Component Object Model (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: Windows 2000, Windows XP, Windows Server 2003 family

Header: MSCorEE.idl

Library: MSCorEE.dll

.NET Framework Version: 2.0

See Also

Concepts

LoadStringRCEx Function

Hosting Global Static Functions