This documentation is archived and is not being maintained.

ICorRuntimeHost::GetDefaultDomain Method

Gets an interface pointer of type System._AppDomain that represents the default domain for the current process.

HRESULT GetDefaultDomain (
    [out] IUnknown** pAppDomain


[out] An interface pointer of type System._AppDomain to the AppDomain instance that represents the default application domain for the process.

This pointer is typed IUnknown, so callers should generally call QueryInterface to obtain an interface pointer of type System._AppDomain.




The operation was successful.


The operation failed to complete.


An unknown, catastrophic failure occurred. If a method returns E_FAIL, the common language runtime (CLR) is no longer usable in the process. Subsequent calls to any hosting APIs return HOST_E_CLRNOTAVAILABLE.


The CLR has not been loaded into a process, or the CLR is in a state in which it cannot run managed code or process the call successfully.

Platforms: See .NET Framework System Requirements.

Header: MSCorEE.h

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: 1.0, 1.1