IDebugControl2::GetExtensionFunction method (dbgeng.h)

The GetExtensionFunction method returns a pointer to an extension function from an extension library.

Syntax

HRESULT GetExtensionFunction(
  [in]  ULONG64 Handle,
  [in]  PCSTR   FuncName,
  [out] FARPROC *Function
);

Parameters

[in] Handle

Specifies the handle of the extension library that contains the extension function. If Handle is zero, the engine will walk the extension library chain searching for the extension function.

[in] FuncName

Specifies the name of the extension function to return. When searching the extension libraries for the function, the debugger engine will prepend "EFN" to the name. For example, if FuncName is "SampleFunction", the engine will search the extension libraries for "_EFN_SampleFunction".

[out] Function

Receives the extension function.

Return value

This method can also return error values. See Return Values for more details.

Return code Description
S_OK
The method was successful.

Remarks

Extension libraries are loaded into the host engine and extension functions cannot be called remotely. The current client must not be a debugging client, it must belong to the host engine.

The extension function can have any function prototype. In order for any program to call this extension function, the extension function should be cast to the correct prototype.

For more information on using extension functions, see Calling Extensions and Extension Functions.

Requirements

Requirement Value
Target Platform Desktop
Header dbgeng.h (include Dbgeng.h)

See also

AddExtension

CallExtension

GetExtensionByPath

IDebugControl

IDebugControl2

IDebugControl3