Uredi

Deli z drugimi prek


ICorProfilerInfo::GetAppDomainInfo Method

Accepts an application domain ID. Returns an application domain name and the ID of the process that contains it.

Syntax

HRESULT GetAppDomainInfo(  
    [in]  AppDomainID appDomainId,  
    [in]  ULONG       cchName,  
    [out] ULONG       *pcchName,  
    [out, size_is(cchName), length_is(*pcchName)]  
          WCHAR       szName[] ,  
    [out] ProcessID   *pProcessId);  

Parameters

appDomainId
[in] The ID of the application domain.

cchName
[in] The length, in characters, of the szName return buffer.

pcchName
[out] A pointer to the total character length of the application domain name.

szName
[out] A caller-provided wide character buffer. When the method returns, szName will contain the full or partial application domain name.

pProcessId
[out] A pointer to the ID of the process that contains the application domain.

Remarks

After this method returns, you must verify that the szName buffer was large enough to contain the full name of the application domain. To do this, compare the value that pcchName points to with the value of the cchName parameter. If pcchName points to a value that is larger than cchName, allocate a larger szName buffer, update cchName with the new, larger size, and call GetAppDomainInfo again.

Alternatively, you can first call GetAppDomainInfo with a zero-length szName buffer to obtain the correct buffer size. You can then set the buffer size to the value returned in pcchName and call GetAppDomainInfo again.

Requirements

Platforms: See System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: Available since 2.0

See also