Muokkaa

Jaa


ICLRRuntimeInfo::LoadErrorString Method

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

This method supersedes the following functions:

Syntax

HRESULT LoadErrorString(  
     [in] UINT iResourceID,  
     [out, size_is(*pcchBuffer)] LPWSTR pwzBuffer,  
     [in, out]  DWORD *pcchBuffer,  
     [in, lcid] LONG iLocaleID);  

Parameters

iResourceID
[in] The HRESULT to translate.

pwzBuffer
[out] The message string associated with the given HRESULT.

pcchBuffer
[in, out] The size of pwzbuffer to avoid buffer overruns. If pwzbuffer is null, pcchBuffer provides the expected size of pwzbuffer to allow preallocation.

iLocaleID
[in] The culture identifier. To use the default culture, you must specify -1.

Return Value

This method returns the following specific HRESULTs as well as HRESULT errors that indicate method failure.

HRESULT Description
S_OK The method completed successfully.
E_POINTER pcchBuffer is null.
E_INVALIDARG pwzBuffer is null.

Requirements

Platforms: See System Requirements.

Header: MetaHost.h

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: Available since 4

See also