Condividi tramite


IDebugClassField::GetEnclosingClass

Gets the class that encloses this class.

HRESULT GetEnclosingClass( 
   IDebugClassField** ppClassField
);
int GetEnclosingClass(
   out IDebugClassField ppClassField
);

Parameters

  • ppClassField
    [out] Returns an IDebugClassField object representing the enclosing class. Returns a null value if there is no enclosing class.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

If the class represented by this IDebugClassField object is a nested class, then the ppClassField parameter returns an IDebugClassField object representing the enclosing class. For example, given this class definition:

class RootClass {
   class NestedClass { }
};

Calling the GetEnclosingClass method on the IDebugClassField object representing the NestedClass class returns an IDebugClassField object representing the class RootClass.

See Also

Reference

IDebugClassField