IAppDomainHelper::Initialize method (comsvcs.h)

Binds the calling object to the current application domain and provides a callback function for shutdown that is executed when the application domain is unloaded.

Syntax

HRESULT Initialize(
  [in] IUnknown            *pUnkAD,
       HRESULT()(void *pv) __MIDL__IAppDomainHelper0000,
  [in] void                *pPool
);

Parameters

[in] pUnkAD

Pointer to the IUnknown of the current application domain.

__MIDL__IAppDomainHelper0000

Reference to the shutdown function that is executed when the application domain is unloaded. The parameter of this function, pv, comes from the pPool parameter, which is defined next.

[in] pPool

This parameter is used to provide any data that the shutdown function might need.

Return value

This method can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, E_FAIL, and S_OK.

Requirements

Requirement Value
Minimum supported client Windows XP with SP1 [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header comsvcs.h

See also

IAppDomainHelper