Share via


ICLRRuntimeInfo::SetDefaultStartupFlags Method

Sets the startup flags and the host configuration file that will be used to start the runtime. This method supersedes the use of the startupFlags parameter in the CorBindToRuntimeEx and CorBindToRuntimeHost functions.

HRESULT SetDefaultStartupFlags(
           [in]  DWORD dwStartupFlags,
           [in]  LPCWSTR pwzHostConfigFile);

Parameters

  • dwStartupFlags
    [in] The host startup flags to set. Use the same flags as with the CorBindToRuntimeEx and CorBindToRuntimeHost functions.

  • pwzHostConfigFile
    [in] The directory path of the host configuration file to set.

Return Value

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

HRESULT

Description

S_OK

The method completed successfully.

Remarks

A multithreaded host should synchronize calls to this method. Otherwise, thread A might call the SetStartupFlags method after thread B completes a call to SetStartupFlags and before thread B starts the runtime.

Requirements

Platforms: See .NET Framework System Requirements.

Header: MetaHost.h

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: 4

See Also

Reference

ICLRRuntimeInfo Interface

Other Resources

Hosting Interfaces

Hosting (Unmanaged API Reference)