This problem is about using wholly unmanaged C++ without using deprecated means.
I am hosting the CLR in C++ calling (in order):
- CLRCreateInstance to get an ICLRMetaHost* .
- The ICLRMetaHost method GetRuntime to get an ICLRRuntimeInfo* for v4.0.30319 .
- The ICLRRuntimeInfo method GetInterface to get an ICLRRuntimeHost* .
- The Start method of ICLRRuntimeHost to start the host.
Back in the day a different route would have produced a (now deprecated) ICorRuntimeHost* and the result of calling its GetDefaultDomain method would be used to get an _AppDomain* giving unmanaged access to the default AppDomain.
https://learn.microsoft.com/en-us/dotnet/api/system._appdomain
This _AppDomain* is what I want, but ICLRRuntimeHost has no analog of GetDefaultDomain.
The new arrangements for CLR hosting that don't use ICorRuntimeHost don't seem to support getting an _AppDomain* by any means I saw from searching online documentation.
How is the needed _AppDomain* obtained nowadays?