FunctionIDMapper2 Function

Notifies the profiler that the given identifier of a function may be remapped to an alternative ID to be used in the FunctionEnter3, FunctionLeave3, and FunctionTailcall3, orFunctionEnter3WithInfo, FunctionLeave3WithInfo, and FunctionTailcall3WithInfo callbacks for that function. FunctionIDMapper2 also enables the profiler to indicate whether it wants to receive callbacks for that function.

Syntax

UINT_PTR __stdcall FunctionIDMapper2 (  
    [in]  FunctionID  funcId,  
    [in]  void * clientData,  
    [out] BOOL       *pbHookFunction  
);  

Parameters

funcId [in] The function identifier to be remapped.

clientData [in] A pointer to data that is used to disambiguate among runtimes.

pbHookFunction [out] A pointer to a value that the profiler sets to true if it wants to receive FunctionEnter3, FunctionLeave3, and FunctionTailcall3, or FunctionEnter3WithInfo, FunctionLeave3WithInfo, and FunctionTailcall3WithInfo callbacks; otherwise, it sets this value to false.

Return Value

The profiler returns a value that the execution engine uses as an alternative function identifier. The return value cannot be null unless false is returned in pbHookFunction. Otherwise, a null return value produces unpredictable results, including possibly halting the process.

Remarks

This method extends the FunctionIDMapper function with an additional parameter that is used to pass client data. The client data is used to disambiguate among runtimes.

Requirements

Platforms: See System Requirements.

Header: CorProf.idl

Library: CorGuids.lib

.NET Framework Versions: Available since 4

See also