Share via


ICorProfilerCallback3::ProfilerDetachSucceeded Method

Notifies the profiler that the common language runtime (CLR) is about to unload the profiler DLL.

HRESULT ProfilerDetachSucceeded();

Return Value

The return value from this callback is ignored.

Remarks

The ProfilerDetachSucceeded callback is issued after all threads have exited the profiler's code. When this method is called, the profiler should perform any last-minute tasks that are not appropriate for its destructor, such as notifying its UI or logging component. However, the profiler must not call functions on interfaces that are provided by the CLR during this callback (such as the ICorProfilerInfo or IMetaData* interfaces).

The CLR creates an entry in the Windows Application event log to indicate that the detach operation is successful.

After the profiler returns from this callback, the CLR releases the profiler object and unloads the profiler DLL. Therefore, the profiler must not perform any actions that would cause execution to occur inside the profiler DLL after it returns from this callback. For example, it must not create threads or register timer callbacks.

Requirements

Platforms: See .NET Framework System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: 4

See Also

Reference

ICorProfilerInfo3 Interface

Concepts

Profiler Attach and Detach

Other Resources

Metadata Interfaces

Profiling Interfaces

Profiling (Unmanaged API Reference)