ICorRuntimeHost::CurrentDomain Method
Gets an interface pointer of type System.AppDomain that represents the domain loaded on the current thread.
Syntax
HRESULT CurrentDomain (
[out] IUnknown** pAppDomain
);
Parameters
pAppDomain
[out] A pointer of type System.AppDomain that represents the thread's current application domain. This pointer is typed IUnknown
, so callers should generally call QueryInterface
to obtain a pointer of type _AppDomain.
Return Value
HRESULT | Description |
---|---|
S_OK | The operation was successful. |
S_FALSE | The operation failed to complete. |
E_FAIL | 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. |
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. |
Requirements
Platforms: See System Requirements.
Header: MSCorEE.h
Library: Included as a resource in MSCorEE.dll
.NET Framework Versions: 1.0, 1.1
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.