This documentation is archived and is not being maintained.

ICorProfilerCallback3::InitializeForAttach Method

Called by the common language runtime (CLR) to give the profiler an opportunity to initialize its state after an attach operation.

HRESULT InitializeForAttach(
            [in] IUnknown * pCorProfilerInfoUnk,
            [in] void * pvClientData,
            [in] UINT cbClientData);

pCorProfilerInfoUnk

[in] An interface pointer for the ICorProfilerInfo* interface.

pvClientData

[in] A pointer to the data passed to the IClrProfiling::AttachProfiler method in its pvClientData parameter. If this parameter is null, cbClientData will be 0 (zero). The CLR frees this memory when it returns from InitializeForAttach.

cbClientData

[in] The size, in bytes, of the data that pvClientData points to.

The CLR calls InitializeForAttach to give the profiler an opportunity to request callbacks. For more information, see Profiler Attach and Detach.

Platforms: See .NET Framework System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: 4

Show: