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);

Parameters

  • 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.

Remarks

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

Requirements

Platforms: See .NET Framework System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: 4

See Also

Reference

ICorProfilerCallback Interface

ICorProfilerInfo3 Interface

Concepts

Profiler Attach and Detach

Other Resources

Profiling Interfaces

Profiling (Unmanaged API Reference)