ICLRRuntimeHost::ExecuteApplication Method

Used in manifest-based ClickOnce deployment scenarios to specify the application to be activated in a new domain. For more information about these scenarios, see ClickOnce Security and Deployment.


HRESULT ExecuteApplication(  
    [in] LPCWSTR   pwzAppFullName,  
    [in] DWORD     dwManifestPaths,  
    [in] LPCWSTR   *ppwzManifestPaths,  
    [in] DWORD     dwActivationData,  
    [in] LPCWSTR   *ppwzActivationData,  
    [out] int      *pReturnValue  


[in] The full name of the application, as defined for ApplicationIdentity.

[in] The number of strings contained in the ppwzManifestPaths array.

[in] Optional. A string array that contains manifest paths for the application.

[in] The number of strings contained in the ppwzActivationData array.

[in] Optional. A string array that contains the application's activation data, such as the query string portion of the URL for applications deployed over the Web.

[out] The value returned from the entry point of the application.

Return Value

HRESULT Description
S_OK ExecuteApplication returned successfully.
HOST_E_CLRNOTAVAILABLE The common language runtime (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.
HOST_E_TIMEOUT The call timed out.
HOST_E_NOT_OWNER The caller does not own the lock.
HOST_E_ABANDONED An event was canceled while a blocked thread or fiber was waiting on it.
E_FAIL An unknown catastrophic failure occurred. If a method returns E_FAIL, the CLR is no longer usable within the process. Subsequent calls to hosting methods return HOST_E_CLRNOTAVAILABLE.


ExecuteApplication is used to activate ClickOnce applications in a newly created application domain.

The pReturnValue output parameter is set to the value returned by the application. If you supply a value of null for pReturnValue, ExecuteApplication does not fail, but it does not return a value.


Do not call the Start Method method before calling the ExecuteApplication method to activate a manifest-based application. If the Start method is called first, the ExecuteApplication method call will fail.


Platforms: See System Requirements.

Header: MSCorEE.h

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: Available since 2.0

See also