Share via


IDebugMethodField::EnumAllLocals

Creates an enumerator for all local variables of the method, including those generated internally by a compiler.

HRESULT EnumAllLocals( 
   IDebugAddress*     pAddress,
   IEnumDebugFields** ppLocals
);
int EnumAllLocals(
   IDebugAddress        pAddress, 
   out IEnumDebugFields ppLocals
);

Parameters

  • pAddress
    [in] An IDebugAddress object representing a debug address within the method, pointing to a particular scope or context.

  • ppLocals
    [out] Returns an IEnumDebugFields object representing the list of all locals in the specified scope; otherwise, returns a null value indicating no locals.

Return Value

If successful, returns S_OK or returns S_FALSE if there are no locals. Otherwise, returns an error code.

Remarks

Only the variables defined within the block that contains the given debug address are enumerated. This method includes any compiler-generated locals. If all that is needed are the locals explicitly defined in the source, call the IDebugMethodField::EnumLocals method.

A method can contain multiple scoping contexts or blocks.

See Also

Reference

IDebugMethodField

IDebugAddress

IEnumDebugFields

IDebugMethodField::EnumLocals